From 1a3f57ce0e57b2fdd9f0c2f066f3cc6e81786960 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Tue, 2 Apr 2024 12:24:08 +0800 Subject: [PATCH] feat: single search more --- lib/app_theme.dart | 3 + lib/models/base_search_more.dart | 34 ++ .../components/inventory_inout_view_item.dart | 5 +- .../new_inventory_inout.dart | 31 +- .../sale_quotation_group_search.dart | 210 ++++++++++ .../sale_quotation.controller.dart | 159 +++++++- .../sale_quotation/sale_quotation.dart | 136 ++++--- lib/widgets/core/sk_single_search_more.dart | 182 +++++++++ lib/widgets/empty.dart | 14 +- pubspec.lock | 358 ++++++++---------- 10 files changed, 843 insertions(+), 289 deletions(-) create mode 100644 lib/models/base_search_more.dart create mode 100644 lib/screens/sale_quotation/components/sale_quotation_group_search.dart create mode 100644 lib/widgets/core/sk_single_search_more.dart diff --git a/lib/app_theme.dart b/lib/app_theme.dart index 28362d7..89f3493 100644 --- a/lib/app_theme.dart +++ b/lib/app_theme.dart @@ -47,6 +47,9 @@ final theme = ThemeData( foregroundColor: MaterialStateProperty.all(AppTheme.primaryColor), // 设置文本颜色为红色 )), + floatingActionButtonTheme: FloatingActionButtonThemeData( + backgroundColor: AppTheme.primaryColorLight, + ), datePickerTheme: DatePickerThemeData( confirmButtonStyle: ButtonStyle( textStyle: MaterialStateProperty.resolveWith( diff --git a/lib/models/base_search_more.dart b/lib/models/base_search_more.dart new file mode 100644 index 0000000..011c70c --- /dev/null +++ b/lib/models/base_search_more.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; +import 'package:get/get_rx/src/rx_types/rx_types.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; + +mixin BaseSearchMore { + RxList list = RxList([]); + RxString searchKey = ''.obs; + final searchBarTextConroller = TextEditingController(); + RefreshController refreshController = RefreshController(initialRefresh: true); + int page = 1; + int limit = 15; + int total = 0; + getData({bool isRefresh = false}) {} + + Future onRefresh() async { + await getData(isRefresh: true).then((_) { + refreshController.refreshCompleted(resetFooterState: true); + }).catchError((_) { + refreshController.refreshFailed(); + }); + } + + Future onLoading() async { + await getData().then((_) { + if (_.isEmpty) { + refreshController.loadNoData(); + } else { + refreshController.loadComplete(); + } + }).catchError((_) { + refreshController.loadFailed(); + }); + } +} diff --git a/lib/screens/inventory_inout/components/inventory_inout_view_item.dart b/lib/screens/inventory_inout/components/inventory_inout_view_item.dart index bdf7bc3..72ea80f 100644 --- a/lib/screens/inventory_inout/components/inventory_inout_view_item.dart +++ b/lib/screens/inventory_inout/components/inventory_inout_view_item.dart @@ -32,11 +32,14 @@ class InventoryInoutViewItem extends StatelessWidget { class Grid extends StatelessWidget { final int columnNum; - final int ind; + int ind; final controller = Get.find(); Grid({super.key, required this.columnNum, required this.ind}); @override Widget build(BuildContext context) { + if (controller.currentIndex.value != ind) { + ind = controller.currentIndex.value; + } return Obx( () => controller.loading.value ? const LoadingIndicator(common: true) diff --git a/lib/screens/new_inventory_inout/new_inventory_inout.dart b/lib/screens/new_inventory_inout/new_inventory_inout.dart index a57f86b..2143f66 100644 --- a/lib/screens/new_inventory_inout/new_inventory_inout.dart +++ b/lib/screens/new_inventory_inout/new_inventory_inout.dart @@ -347,27 +347,16 @@ class NewInventoryInout extends StatelessWidget { floatingLabelBehavior: FloatingLabelBehavior.always), readOnly: true, onTap: () { - if (inOrOut == InventoryInOrOutEnum.In) { - ModalUtil.showGeneralDialog(content: AgentSearch( - onSelected: (UserInfoModel userInfo) { - Get.back(); - controller.payload['agent'] = userInfo.nickname; - controller.agentTextController.text = userInfo.nickname!; - }, - )); - } else { - ModalUtil.showGeneralDialog( - content: AgentSearch( - onSelected: (UserInfoModel userInfo) { - Get.back(); - controller.payload['agent'] = userInfo.nickname; - controller.agentTextController.text = - userInfo.nickname!; - }, - ), - width: Get.width - ScreenAdaper.width(50)) - .then((value) => Get.delete()); - } + ModalUtil.showGeneralDialog( + content: AgentSearch( + onSelected: (UserInfoModel userInfo) { + Get.back(); + controller.payload['agent'] = userInfo.nickname; + controller.agentTextController.text = userInfo.nickname!; + }, + ), + width: Get.width - ScreenAdaper.width(50)) + .then((value) => Get.delete()); }); } diff --git a/lib/screens/sale_quotation/components/sale_quotation_group_search.dart b/lib/screens/sale_quotation/components/sale_quotation_group_search.dart new file mode 100644 index 0000000..101f054 --- /dev/null +++ b/lib/screens/sale_quotation/components/sale_quotation_group_search.dart @@ -0,0 +1,210 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:sk_base_mobile/apis/index.dart'; +import 'package:sk_base_mobile/app_theme.dart'; +import 'package:sk_base_mobile/constants/bg_color.dart'; +import 'package:sk_base_mobile/models/sale_quotation.model.dart'; +import 'package:sk_base_mobile/models/user_info.model.dart'; +import 'package:sk_base_mobile/util/debouncer.dart'; +import 'package:sk_base_mobile/util/screen_adaper_util.dart'; +import 'package:sk_base_mobile/widgets/empty.dart'; +import 'package:sk_base_mobile/widgets/fade_in_cache_image.dart'; + +class SaleQuotationGroupSearch extends StatelessWidget { + final Function(SaleQuotationModel)? onSelected; + final Function(SaleQuotationModel)? beforeSelectedCheck; + SaleQuotationGroupSearch( + {super.key, this.onSelected, this.beforeSelectedCheck}); + final controller = Get.put(GroupSearchController()); + final listTitleTextStyle = + TextStyle(fontSize: ScreenAdaper.height(20), fontWeight: FontWeight.w600); + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric( + horizontal: ScreenAdaper.width(20), + vertical: ScreenAdaper.height(20)), + child: Column( + children: [ + buildSearchBar(), + SizedBox( + height: ScreenAdaper.height(defaultPadding) / 2, + ), + Expanded(child: buildList()) + ], + ), + ); + } + + Widget buildSearchBar() { + final doSearch = debouncer((String value) { + controller.searchKey.value = value; + controller.onRefresh(); + }, delayTime: 500); + + return Row( + children: [ + Expanded( + flex: 5, + child: TextField( + controller: controller.searchBarTextConroller, + onChanged: (value) => doSearch(value), + decoration: InputDecoration( + contentPadding: EdgeInsets.symmetric( + vertical: ScreenAdaper.height(10), + horizontal: ScreenAdaper.width(10)), + hintText: '名称', + floatingLabelBehavior: FloatingLabelBehavior.always, + prefixIcon: const Icon(Icons.search), + // 当searchBarController有值时不显示 + suffixIcon: Obx(() => controller.searchKey.value.isEmpty + ? const SizedBox() + : IconButton( + icon: const Icon(Icons.clear), + onPressed: () { + controller.searchKey.value = ''; + controller.searchBarTextConroller.clear(); + doSearch(''); + }, + )), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + ), + ))), + ], + ); + } + + Widget buildList() { + return Obx(() => SmartRefresher( + enablePullDown: true, + enablePullUp: true, + controller: controller.refreshController, + onLoading: controller.onLoading, + onRefresh: controller.onRefresh, + child: controller.refreshController.isLoading + ? const SizedBox() + : controller.list.isEmpty + ? const Center( + child: Empty(text: '暂无数据'), + ) + : ListView.separated( + separatorBuilder: (context, index) => const Divider( + color: AppTheme.dividerColor, + ), + itemCount: controller.list.length, + itemBuilder: (_, index) => buildItem(index)))); + } + + Widget buildItem(int index) { + return InkWell( + onTap: () => { + if (beforeSelectedCheck != null) + { + if (beforeSelectedCheck!(controller.list[index])) + {onSelected!(controller.list[index])} + } + else + {onSelected!(controller.list[index])} + }, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: ScreenAdaper.width(5), + vertical: ScreenAdaper.height(10)), + child: Row( + children: [ + // ClipRRect( + // borderRadius: BorderRadius.circular(ScreenAdaper.sp(15)), + // child: FadeInCacheImage( + // url: controller.list[index].avatar ?? '', + // width: ScreenAdaper.width(60), + // height: ScreenAdaper.width(60), + // ), + // ), + // SizedBox( + // width: ScreenAdaper.width(20), + // ), + Text( + '${controller.list[index].name}', + style: TextStyle(fontSize: ScreenAdaper.height(25)), + ), + // if (controller.list[index].dept != null) ...[ + // SizedBox( + // width: ScreenAdaper.width(20), + // ), + // Container( + // padding: EdgeInsets.symmetric( + // horizontal: ScreenAdaper.width(10), + // vertical: ScreenAdaper.height(5)), + // decoration: BoxDecoration( + // color: Colors.grey[300], + // borderRadius: BorderRadius.circular(ScreenAdaper.sp(10))), + // child: Text('${controller.list[index].dept?.name}'), + // ) + ], + ), + ), + ); + } +} + +class GroupSearchController extends GetxController { + RxList list = RxList([]); + RxString searchKey = ''.obs; + final searchBarTextConroller = TextEditingController(); + RefreshController refreshController = RefreshController(initialRefresh: true); + int page = 1; + int limit = 15; + int total = 0; + Future> getData({bool isRefresh = false}) async { + // if (isRefresh == true) { + // page = 1; + // } else { + // page++; + // } + // final res = await Api.getUsers({ + // 'page': page, + // 'pageSize': 15, + // 'keyword': searchKey.value, + // }); + // List newList = + // res.data!.items.map((e) => UserInfoModel.fromJson(e)).toList(); + // isRefresh == true ? list.assignAll(newList) : list.addAll(newList); + + List newList = [ + SaleQuotationModel(name: '中间过渡架电控部分', items: []), + SaleQuotationModel(name: '端头架电控部分', items: []), + SaleQuotationModel(name: '主阀部分', items: []), + SaleQuotationModel(name: '自动反冲洗过滤器部分', items: []), + SaleQuotationModel(name: '位移测量部分', items: []), + SaleQuotationModel(name: '压力检测部分', items: []), + SaleQuotationModel(name: '煤机定位部分', items: []), + SaleQuotationModel(name: '姿态检测部分', items: []), + ]; + list.assignAll(newList); + return newList; + } + + Future onRefresh() async { + await getData(isRefresh: true).then((_) { + refreshController.refreshCompleted(resetFooterState: true); + }).catchError((_) { + refreshController.refreshFailed(); + }); + } + + Future onLoading() async { + await getData().then((_) { + if (_.isEmpty) { + refreshController.loadNoData(); + } else { + refreshController.loadComplete(); + } + }).catchError((_) { + refreshController.loadFailed(); + }); + } +} diff --git a/lib/screens/sale_quotation/sale_quotation.controller.dart b/lib/screens/sale_quotation/sale_quotation.controller.dart index 2bc9a24..ad9a4d7 100644 --- a/lib/screens/sale_quotation/sale_quotation.controller.dart +++ b/lib/screens/sale_quotation/sale_quotation.controller.dart @@ -1,5 +1,12 @@ +import 'package:flutter/material.dart'; import 'package:get/get.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:sk_base_mobile/models/base_search_more.dart'; import 'package:sk_base_mobile/models/sale_quotation.model.dart'; +import 'package:sk_base_mobile/screens/sale_quotation/components/sale_quotation_group_search.dart'; +import 'package:sk_base_mobile/widgets/core/sk_single_search_more.dart'; +import 'package:sk_base_mobile/util/modal.util.dart'; +import 'package:sk_base_mobile/util/screen_adaper_util.dart'; class SaleQuotationController extends GetxController { static SaleQuotationController get to => Get.find(); @@ -27,19 +34,149 @@ class SaleQuotationController extends GetxController { SaleQuotationItemModel(name: '各类安装附件'), ]); RxList groups = RxList([]); + @override void onReady() { - groups.assignAll([ - SaleQuotationModel(name: '中间过渡架电控部分', items: products), - SaleQuotationModel(name: '端头架电控部分', items: products), - SaleQuotationModel(name: '主阀部分', items: products), - SaleQuotationModel(name: '自动反冲洗过滤器部分', items: products), - SaleQuotationModel(name: '位移测量部分', items: products), - SaleQuotationModel(name: '压力检测部分', items: products), - SaleQuotationModel(name: '煤机定位部分', items: products), - SaleQuotationModel(name: '姿态检测部分', items: products), - ]); - + // groups.assignAll(); + // SaleQuotationModel(name: '中间过渡架电控部分', items: products), + // SaleQuotationModel(name: '端头架电控部分', items: products), + // SaleQuotationModel(name: '主阀部分', items: products), + // SaleQuotationModel(name: '自动反冲洗过滤器部分', items: products), + // SaleQuotationModel(name: '位移测量部分', items: products), + // SaleQuotationModel(name: '压力检测部分', items: products), + // SaleQuotationModel(name: '煤机定位部分', items: products), + // SaleQuotationModel(name: '姿态检测部分', items: products), super.onReady(); } + + Future addGroup() async { + final controller = Get.put(GroupSearchMoreController()); + // 选择组件 选择分组 + ModalUtil.showGeneralDialog( + content: SkSingleSearchMore( + controller: controller, + enablePullUp: false, + enablePullDown: true, + itemBuilder: (_, index) { + return InkWell( + onTap: () { + Get.back(); + groups.add(controller.list[index]); + }, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: ScreenAdaper.width(5), + vertical: ScreenAdaper.height(10)), + child: Row( + children: [ + Text( + controller.list[index].name, + style: TextStyle(fontSize: ScreenAdaper.height(25)), + ), + ], + ), + )); + }, + ), + width: Get.width - ScreenAdaper.width(50)) + .then((value) => Get.delete()); + } + + Future removeGroup(int index) async { + groups.removeAt(index); + } + + Future addItems() async { + final controller = Get.put(ItemSearchMoreController()); + // 选择产品 + ModalUtil.showGeneralDialog( + content: SkSingleSearchMore( + controller: controller, + enablePullUp: false, + enablePullDown: true, + isDialog: true, + itemBuilder: (_, index) { + return InkWell( + onTap: () { + Get.back(); + // if (beforeSelectedCheck != null) + // { + // if (beforeSelectedCheck!(controller.list[index])) + // {onSelected!(controller.list[index])} + // } + // else + // {onSelected!(controller.list[index])} + }, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: ScreenAdaper.width(5), + vertical: ScreenAdaper.height(10)), + child: Row( + children: [ + Text( + controller.list[index].name, + style: TextStyle(fontSize: ScreenAdaper.height(25)), + ), + ], + ), + )); + }, + // onSelected: (SaleQuotationItemModel info) { + // Get.back(); + // // groups.add(info); + // }, + ), + width: Get.width - ScreenAdaper.width(50)) + .then((value) => Get.delete()); + } +} + +class GroupSearchMoreController extends GetxController + with BaseSearchMore { + @override + Future> getData({bool isRefresh = false}) async { + List newList = [ + SaleQuotationModel(name: '中间过渡架电控部分', items: []), + SaleQuotationModel(name: '端头架电控部分', items: []), + SaleQuotationModel(name: '主阀部分', items: []), + SaleQuotationModel(name: '自动反冲洗过滤器部分', items: []), + SaleQuotationModel(name: '位移测量部分', items: []), + SaleQuotationModel(name: '压力检测部分', items: []), + SaleQuotationModel(name: '煤机定位部分', items: []), + SaleQuotationModel(name: '姿态检测部分', items: []), + ]; + list.assignAll(newList); + return newList; + } +} + +class ItemSearchMoreController extends GetxController + with BaseSearchMore { + @override + Future> getData({bool isRefresh = false}) async { + List newList = [ + SaleQuotationItemModel(name: '矿用本安型支架控制器', unit: '台', spec: 'ZDYZ-Z'), + SaleQuotationItemModel(name: '矿用本安型电磁阀驱动器'), + SaleQuotationItemModel(name: '矿用隔爆兼本安型电源'), + SaleQuotationItemModel(name: '矿用本安型隔离耦合器'), + SaleQuotationItemModel(name: '钢丝编织橡胶护套连接器'), + SaleQuotationItemModel(name: '钢丝编织橡胶护套连接器', remark: '控制器-控制器'), + SaleQuotationItemModel(name: '钢丝编织橡胶护套连接器', remark: '控制器-驱动器'), + SaleQuotationItemModel(name: '钢丝编织橡胶护套连接器', remark: '控制器-隔离耦合器'), + SaleQuotationItemModel(name: '矿用本安型支架无线遥控器'), + SaleQuotationItemModel(name: '矿用隔爆兼本安型电源'), + SaleQuotationItemModel(name: '电液换向阀(10功能10接口)', remark: '中间过渡架主阀组'), + SaleQuotationItemModel(name: '电液换向阀(20功能20接口)', remark: '端头架主阀组'), + SaleQuotationItemModel(name: '自动反冲洗过滤装置', remark: '流量:900L/min,过滤精度25μm'), + SaleQuotationItemModel(name: '全自动反冲洗过滤器电缆', remark: '控制器-自动反冲洗'), + SaleQuotationItemModel(name: '矿用本安型位移传感器'), + SaleQuotationItemModel(name: '矿用本安型压力传感器'), + SaleQuotationItemModel(name: '矿用本安型红外发射器'), + SaleQuotationItemModel(name: '矿用本安型LED信号灯'), + SaleQuotationItemModel(name: '倾角传感器'), + SaleQuotationItemModel(name: '各类安装附件'), + ]; + list.assignAll(newList); + return newList; + } } diff --git a/lib/screens/sale_quotation/sale_quotation.dart b/lib/screens/sale_quotation/sale_quotation.dart index 1c20fff..da3a4ee 100644 --- a/lib/screens/sale_quotation/sale_quotation.dart +++ b/lib/screens/sale_quotation/sale_quotation.dart @@ -10,6 +10,7 @@ import 'package:sk_base_mobile/util/modal.util.dart'; import 'package:sk_base_mobile/util/screen_adaper_util.dart'; import 'package:sk_base_mobile/widgets/core/sk_number_input.dart'; import 'package:sk_base_mobile/widgets/core/sk_text_input.dart'; +import 'package:sk_base_mobile/widgets/empty.dart'; import 'package:sk_base_mobile/widgets/sk_appbar.dart'; import 'package:flutter_sticky_header/flutter_sticky_header.dart'; @@ -28,16 +29,28 @@ class SaleQuotationPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( + floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, + floatingActionButton: FloatingActionButton( + onPressed: () { + controller.addGroup(); + }, + child: const Icon(Icons.add), + ), appBar: SkAppbar( title: '报价计算', action: [ TextButton( - onPressed: () {}, + onPressed: () { + controller.addGroup(); + }, child: Row( children: [ - Icon(Icons.add, color: AppTheme.white), + Icon(Icons.save, color: AppTheme.white), + SizedBox( + width: ScreenAdaper.width(10), + ), Text( - '添加组', + '保存', style: TextStyle( color: AppTheme.white, fontSize: ScreenAdaper.height(25), @@ -51,63 +64,70 @@ class SaleQuotationPage extends StatelessWidget { bottom: ScreenAdaper.isLandspace() ? false : true, child: Column( children: [ - Container( - decoration: BoxDecoration( - color: headerBgcolor, - border: Border( - bottom: BorderSide( - color: AppTheme.nearlyBlack.withOpacity(0.5)))), - padding: EdgeInsets.only( - left: ScreenAdaper.width(20), - top: ScreenAdaper.height(10), - bottom: ScreenAdaper.height(10)), - child: Row( - children: [ - Text( - '名称', - style: headerTitleStyle, - ), - const Spacer(), - Container( - alignment: Alignment.center, - width: quantityWidth, - // constraints: BoxConstraints(minWidth: quantityWidth), - child: Text( - '数量', - style: headerTitleStyle, - ), - ), - Container( - alignment: Alignment.center, - width: unitPriceWidth, - // constraints: BoxConstraints(minWidth: unitPriceWidth), - child: Text( - '单价', - style: headerTitleStyle, - ), - ), - Container( - alignment: Alignment.center, - width: amountWidth, - child: Text( - '总价', - style: headerTitleStyle, - ), - ), - ], - )), + builderHeader(), Expanded( - child: Obx(() => CustomScrollView( - slivers: controller.groups - .mapIndexed((index, e) => buildBody(e, index)) - .toList(), - ))), + child: Obx(() => controller.groups.isEmpty + ? Empty(text: '请先添加分组') + : CustomScrollView( + slivers: controller.groups + .mapIndexed( + (index, e) => buildBody(e, index)) + .toList(), + ))), ], ), ), ); } + Widget builderHeader() { + return Container( + decoration: BoxDecoration( + color: headerBgcolor, + border: Border( + bottom: + BorderSide(color: AppTheme.nearlyBlack.withOpacity(0.5)))), + padding: EdgeInsets.only( + left: ScreenAdaper.width(20), + top: ScreenAdaper.height(10), + bottom: ScreenAdaper.height(10)), + child: Row( + children: [ + Text( + '名称', + style: headerTitleStyle, + ), + const Spacer(), + Container( + alignment: Alignment.center, + width: quantityWidth, + // constraints: BoxConstraints(minWidth: quantityWidth), + child: Text( + '数量', + style: headerTitleStyle, + ), + ), + Container( + alignment: Alignment.center, + width: unitPriceWidth, + // constraints: BoxConstraints(minWidth: unitPriceWidth), + child: Text( + '单价', + style: headerTitleStyle, + ), + ), + Container( + alignment: Alignment.center, + width: amountWidth, + child: Text( + '总价', + style: headerTitleStyle, + ), + ), + ], + )); + } + Widget buildBody(SaleQuotationModel group, int index) { final titleStyle = TextStyle( fontSize: ScreenAdaper.height(30), @@ -156,14 +176,20 @@ class SaleQuotationPage extends StatelessWidget { const Spacer(), IconButton( onPressed: () { - ModalUtil.confirm(title: '确定要删除此组吗?', onConfirm: () {}); + ModalUtil.confirm( + title: '确定要删除此组吗?', + onConfirm: () { + controller.removeGroup(index); + }); }, icon: const Icon( Icons.remove_circle_outline_outlined, color: AppTheme.nearlyBlack, )), IconButton( - onPressed: () {}, + onPressed: () { + controller.addItems(); + }, icon: const Icon( Icons.add_circle_outline, color: AppTheme.nearlyBlack, diff --git a/lib/widgets/core/sk_single_search_more.dart b/lib/widgets/core/sk_single_search_more.dart new file mode 100644 index 0000000..2a7e059 --- /dev/null +++ b/lib/widgets/core/sk_single_search_more.dart @@ -0,0 +1,182 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:sk_base_mobile/app_theme.dart'; +import 'package:sk_base_mobile/constants/bg_color.dart'; +import 'package:sk_base_mobile/models/base_search_more.dart'; +import 'package:sk_base_mobile/util/debouncer.dart'; +import 'package:sk_base_mobile/util/screen_adaper_util.dart'; +import 'package:sk_base_mobile/widgets/empty.dart'; + +class SkSingleSearchMore extends StatelessWidget { + final Function(T)? onSelected; + final Function(T)? beforeSelectedCheck; + // ignore: prefer_typing_uninitialized_variables + final BaseSearchMore controller; + final bool enablePullUp; + final bool enablePullDown; + final bool isDialog; + + final Function(BuildContext, int)? itemBuilder; + SkSingleSearchMore( + {super.key, + required this.controller, + this.onSelected, + this.isDialog = true, + this.beforeSelectedCheck, + this.itemBuilder, + this.enablePullDown = true, + this.enablePullUp = true}); + final listTitleTextStyle = + TextStyle(fontSize: ScreenAdaper.height(20), fontWeight: FontWeight.w600); + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric( + horizontal: ScreenAdaper.width(20), + vertical: ScreenAdaper.height(20)), + child: Column( + children: [ + Container( + height: ScreenAdaper.height(60), + padding: EdgeInsets.only(bottom: ScreenAdaper.height(15)), + child: Stack( + children: [ + Center( + child: Text( + '请选择', + style: TextStyle( + fontSize: ScreenAdaper.height(30), + fontWeight: FontWeight.w600), + ), + ), + Positioned( + right: 0, + child: + GestureDetector(onTap: () {}, child: Icon(Icons.close))) + ], + ), + ), + buildSearchBar(), + SizedBox( + height: ScreenAdaper.height(defaultPadding) / 2, + ), + Expanded(child: buildList()) + ], + ), + ); + } + + Widget buildSearchBar() { + final doSearch = debouncer((String value) { + controller.searchKey.value = value; + controller.onRefresh(); + }, delayTime: 500); + + return Row( + children: [ + Expanded( + flex: 5, + child: TextField( + controller: controller.searchBarTextConroller, + onChanged: (value) => doSearch(value), + decoration: InputDecoration( + contentPadding: EdgeInsets.symmetric( + vertical: ScreenAdaper.height(10), + horizontal: ScreenAdaper.width(10)), + hintText: '名称', + floatingLabelBehavior: FloatingLabelBehavior.always, + prefixIcon: const Icon(Icons.search), + // 当searchBarController有值时不显示 + suffixIcon: Obx(() => controller.searchKey.value.isEmpty + ? const SizedBox() + : IconButton( + icon: const Icon(Icons.clear), + onPressed: () { + controller.searchKey.value = ''; + controller.searchBarTextConroller.clear(); + doSearch(''); + }, + )), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + ), + ))), + ], + ); + } + + Widget buildList() { + return Obx(() => SmartRefresher( + enablePullDown: enablePullDown, + enablePullUp: enablePullUp, + controller: controller.refreshController, + onLoading: controller.onLoading, + onRefresh: controller.onRefresh, + child: controller.refreshController.isLoading + ? const SizedBox() + : controller.list.isEmpty + ? const Center( + child: Empty(text: '暂无数据'), + ) + : ListView.separated( + separatorBuilder: (context, index) => const Divider( + color: AppTheme.dividerColor, + ), + itemCount: controller.list.length, + itemBuilder: (_, index) => itemBuilder != null + ? itemBuilder!(_, index) + : buildItem(index)))); + } + + Widget buildItem(int index) { + return InkWell( + onTap: () => { + // if (beforeSelectedCheck != null) + // { + // if (beforeSelectedCheck!(controller.list[index])) + // {onSelected!(controller.list[index])} + // } + // else + // {onSelected!(controller.list[index])} + }, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: ScreenAdaper.width(5), + vertical: ScreenAdaper.height(10)), + child: Row( + children: [ + // ClipRRect( + // borderRadius: BorderRadius.circular(ScreenAdaper.sp(15)), + // child: FadeInCacheImage( + // url: controller.list[index].avatar ?? '', + // width: ScreenAdaper.width(60), + // height: ScreenAdaper.width(60), + // ), + // ), + // SizedBox( + // width: ScreenAdaper.width(20), + // ), + Text( + '${controller.list[index].name}', + style: TextStyle(fontSize: ScreenAdaper.height(25)), + ), + // if (controller.list[index].dept != null) ...[ + // SizedBox( + // width: ScreenAdaper.width(20), + // ), + // Container( + // padding: EdgeInsets.symmetric( + // horizontal: ScreenAdaper.width(10), + // vertical: ScreenAdaper.height(5)), + // decoration: BoxDecoration( + // color: Colors.grey[300], + // borderRadius: BorderRadius.circular(ScreenAdaper.sp(10))), + // child: Text('${controller.list[index].dept?.name}'), + // ) + ], + ), + ), + ); + } +} diff --git a/lib/widgets/empty.dart b/lib/widgets/empty.dart index e8a2d85..ddb2aa2 100644 --- a/lib/widgets/empty.dart +++ b/lib/widgets/empty.dart @@ -9,15 +9,17 @@ class Empty extends StatelessWidget { @override Widget build(BuildContext context) { return Center( - child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ - // Center( - // child: Image( - // height: ScreenAdaper.height(130), - // image: const AssetImage('assets/images/empty_icon.png'))), + child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ + Center( + child: Icon(Icons.error_outline, + size: ScreenAdaper.height(40), color: Colors.red)), + SizedBox( + width: ScreenAdaper.width(10), + ), Text( text ?? '', textAlign: TextAlign.center, - style: TextStyle(fontSize: ScreenAdaper.height(30)), + style: TextStyle(fontSize: ScreenAdaper.height(35)), ), ]), ); diff --git a/pubspec.lock b/pubspec.lock index d255bcc..e413b1d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -6,7 +6,7 @@ packages: description: name: animated_bottom_navigation_bar sha256: "2b04a2ae4b0742669e60ddf309467d6a354cefd2d0cd20f4737b1efaf9834cda" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.3.3" ansicolor: @@ -14,7 +14,7 @@ packages: description: name: ansicolor sha256: "8bf17a8ff6ea17499e40a2d2542c2f481cd7615760c6d34065cb22bfd22e6880" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.2" archive: @@ -22,7 +22,7 @@ packages: description: name: archive sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.4.10" args: @@ -30,7 +30,7 @@ packages: description: name: args sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.4.2" async: @@ -38,7 +38,7 @@ packages: description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.11.0" auto_size_text: @@ -46,7 +46,7 @@ packages: description: name: auto_size_text sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.0.0" boolean_selector: @@ -54,7 +54,7 @@ packages: description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.1" cached_network_image: @@ -62,7 +62,7 @@ packages: description: name: cached_network_image sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.3.1" cached_network_image_platform_interface: @@ -70,7 +70,7 @@ packages: description: name: cached_network_image_platform_interface sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.0.0" cached_network_image_web: @@ -78,7 +78,7 @@ packages: description: name: cached_network_image_web sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.1.1" characters: @@ -86,7 +86,7 @@ packages: description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.3.0" checked_yaml: @@ -94,7 +94,7 @@ packages: description: name: checked_yaml sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.3" cli_util: @@ -102,7 +102,7 @@ packages: description: name: cli_util sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.4.1" clock: @@ -110,7 +110,7 @@ packages: description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.1.1" collection: @@ -118,7 +118,7 @@ packages: description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.18.0" convert: @@ -126,23 +126,23 @@ packages: description: name: convert sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.1.1" cross_file: dependency: transitive description: name: cross_file - sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" - url: "https://pub.flutter-io.cn" + sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + url: "https://pub.dev" source: hosted - version: "0.3.4+1" + version: "0.3.3+8" crypto: dependency: "direct main" description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.0.3" csslib: @@ -150,7 +150,7 @@ packages: description: name: csslib sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.0" cupertino_icons: @@ -158,7 +158,7 @@ packages: description: name: cupertino_icons sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.6" date_format: @@ -166,7 +166,7 @@ packages: description: name: date_format sha256: "8e5154ca363411847220c8cbc43afcf69c08e8debe40ba09d57710c25711760c" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.7" decimal: @@ -174,7 +174,7 @@ packages: description: name: decimal sha256: "24a261d5d5c87e86c7651c417a5dbdf8bcd7080dd592533910e8d0505a279f21" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.3" dio: @@ -182,7 +182,7 @@ packages: description: name: dio sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "5.4.2+1" fake_async: @@ -190,7 +190,7 @@ packages: description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.3.1" faker: @@ -198,23 +198,23 @@ packages: description: name: faker sha256: "746e59f91d8b06a389e74cf76e909a05ed69c12691768e2f93557fdf29200fd0" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.0" ffi: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" - url: "https://pub.flutter-io.cn" + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.0" file: dependency: transitive description: name: file sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "7.0.0" file_selector_linux: @@ -222,7 +222,7 @@ packages: description: name: file_selector_linux sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.9.2+1" file_selector_macos: @@ -230,7 +230,7 @@ packages: description: name: file_selector_macos sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.9.3+3" file_selector_platform_interface: @@ -238,7 +238,7 @@ packages: description: name: file_selector_platform_interface sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.6.2" file_selector_windows: @@ -246,7 +246,7 @@ packages: description: name: file_selector_windows sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.9.3+1" fixnum: @@ -254,7 +254,7 @@ packages: description: name: fixnum sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.1.0" flutter: @@ -267,7 +267,7 @@ packages: description: name: flutter_cache_manager sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.3.1" flutter_keyboard_visibility: @@ -275,7 +275,7 @@ packages: description: name: flutter_keyboard_visibility sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "6.0.0" flutter_keyboard_visibility_linux: @@ -283,7 +283,7 @@ packages: description: name: flutter_keyboard_visibility_linux sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.0" flutter_keyboard_visibility_macos: @@ -291,7 +291,7 @@ packages: description: name: flutter_keyboard_visibility_macos sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.0" flutter_keyboard_visibility_platform_interface: @@ -299,7 +299,7 @@ packages: description: name: flutter_keyboard_visibility_platform_interface sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.0" flutter_keyboard_visibility_web: @@ -307,7 +307,7 @@ packages: description: name: flutter_keyboard_visibility_web sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.0" flutter_keyboard_visibility_windows: @@ -315,7 +315,7 @@ packages: description: name: flutter_keyboard_visibility_windows sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.0" flutter_launcher_icons: @@ -323,7 +323,7 @@ packages: description: name: flutter_launcher_icons sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.13.1" flutter_lints: @@ -331,23 +331,23 @@ packages: description: name: flutter_lints sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.0.2" flutter_native_splash: dependency: "direct main" description: name: flutter_native_splash - sha256: edf39bcf4d74aca1eb2c1e43c3e445fd9f494013df7f0da752fefe72020eedc0 - url: "https://pub.flutter-io.cn" + sha256: "45e2c0986d749c070509e03d6c7ad6c8bd1f7b1dad7d11dd8750a5e4fe3e2c0b" + url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.3.11" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.17" flutter_screenutil: @@ -355,7 +355,7 @@ packages: description: name: flutter_screenutil sha256: "8cf100b8e4973dc570b6415a2090b0bfaa8756ad333db46939efc3e774ee100d" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "5.9.0" flutter_slidable: @@ -363,7 +363,7 @@ packages: description: name: flutter_slidable sha256: "673403d2eeef1f9e8483bd6d8d92aae73b1d8bd71f382bc3930f699c731bc27c" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.1.0" flutter_staggered_grid_view: @@ -371,7 +371,7 @@ packages: description: name: flutter_staggered_grid_view sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.7.0" flutter_sticky_header: @@ -379,7 +379,7 @@ packages: description: name: flutter_sticky_header sha256: "017f398fbb45a589e01491861ca20eb6570a763fd9f3888165a978e11248c709" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.6.5" flutter_svg: @@ -387,7 +387,7 @@ packages: description: name: flutter_svg sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.10+1" flutter_test: @@ -400,7 +400,7 @@ packages: description: name: flutter_typeahead sha256: d64712c65db240b1057559b952398ebb6e498077baeebf9b0731dade62438a6d - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "5.2.0" flutter_web_plugins: @@ -413,7 +413,7 @@ packages: description: name: get sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.6.6" html: @@ -421,23 +421,23 @@ packages: description: name: html sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.15.4" http: dependency: transitive description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" - url: "https://pub.flutter-io.cn" + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.0" http_parser: dependency: transitive description: name: http_parser sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.0.2" image: @@ -445,7 +445,7 @@ packages: description: name: image sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.1.7" image_gallery_saver: @@ -453,7 +453,7 @@ packages: description: name: image_gallery_saver sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.3" image_picker: @@ -461,7 +461,7 @@ packages: description: name: image_picker sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.7" image_picker_android: @@ -469,23 +469,23 @@ packages: description: name: image_picker_android sha256: "42c098e7fb6334746be37cdc30369ade356ed4f14d48b7a0313f95a9159f4321" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.8.9+5" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "6a1704fdd75022272e7e7a897a9068e9c2ff3cd6a66820bf3ded810633eac954" - url: "https://pub.flutter-io.cn" + sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.2" image_picker_ios: dependency: transitive description: name: image_picker_ios sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.8.9+2" image_picker_linux: @@ -493,7 +493,7 @@ packages: description: name: image_picker_linux sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.2.1+1" image_picker_macos: @@ -501,23 +501,23 @@ packages: description: name: image_picker_macos sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.2.1+1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - sha256: "3d2c323daea9d60608f1caf30be32a938916f4975434b8352e6f73dae496da38" - url: "https://pub.flutter-io.cn" + sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + url: "https://pub.dev" source: hosted - version: "2.9.4" + version: "2.9.3" image_picker_windows: dependency: transitive description: name: image_picker_windows sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.2.1+1" intl: @@ -525,7 +525,7 @@ packages: description: name: intl sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.19.0" js: @@ -533,7 +533,7 @@ packages: description: name: js sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.7.1" json_annotation: @@ -541,39 +541,15 @@ packages: description: name: json_annotation sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.8.1" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" - url: "https://pub.flutter-io.cn" - source: hosted - version: "10.0.0" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.1" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.1" lints: dependency: transitive description: name: lints sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.0.0" loading_animation_widget: @@ -581,39 +557,39 @@ packages: description: name: loading_animation_widget sha256: ee3659035528d19145d50cf0107632bf647e7306c88b6a32f35f3bed63f6d728 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.2.1" matcher: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.flutter-io.cn" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" - url: "https://pub.flutter-io.cn" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 - url: "https://pub.flutter-io.cn" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.10.0" mime: dependency: transitive description: name: mime sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.5" octo_image: @@ -621,7 +597,7 @@ packages: description: name: octo_image sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.0" package_info: @@ -629,23 +605,23 @@ packages: description: name: package_info sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.2" path: dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.flutter-io.cn" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.8.3" path_parsing: dependency: transitive description: name: path_parsing sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.1" path_provider: @@ -653,7 +629,7 @@ packages: description: name: path_provider sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.2" path_provider_android: @@ -661,7 +637,7 @@ packages: description: name: path_provider_android sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.2" path_provider_foundation: @@ -669,7 +645,7 @@ packages: description: name: path_provider_foundation sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.2" path_provider_linux: @@ -677,7 +653,7 @@ packages: description: name: path_provider_linux sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.1" path_provider_platform_interface: @@ -685,7 +661,7 @@ packages: description: name: path_provider_platform_interface sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.2" path_provider_windows: @@ -693,7 +669,7 @@ packages: description: name: path_provider_windows sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.1" permission_handler: @@ -701,7 +677,7 @@ packages: description: name: permission_handler sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "11.3.1" permission_handler_android: @@ -709,7 +685,7 @@ packages: description: name: permission_handler_android sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "12.0.5" permission_handler_apple: @@ -717,7 +693,7 @@ packages: description: name: permission_handler_apple sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "9.4.4" permission_handler_html: @@ -725,7 +701,7 @@ packages: description: name: permission_handler_html sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.1.1" permission_handler_platform_interface: @@ -733,7 +709,7 @@ packages: description: name: permission_handler_platform_interface sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.2.1" permission_handler_windows: @@ -741,7 +717,7 @@ packages: description: name: permission_handler_windows sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.2.1" petitparser: @@ -749,7 +725,7 @@ packages: description: name: petitparser sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "6.0.2" photo_view: @@ -757,7 +733,7 @@ packages: description: name: photo_view sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.14.0" platform: @@ -765,7 +741,7 @@ packages: description: name: platform sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.1.4" plugin_platform_interface: @@ -773,7 +749,7 @@ packages: description: name: plugin_platform_interface sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.8" pointer_interceptor: @@ -781,7 +757,7 @@ packages: description: name: pointer_interceptor sha256: bd18321519718678d5fa98ad3a3359cbc7a31f018554eab80b73d08a7f0c165a - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.10.1" pointer_interceptor_ios: @@ -789,7 +765,7 @@ packages: description: name: pointer_interceptor_ios sha256: "2e73c39452830adc4695757130676a39412a3b7f3c34e3f752791b5384770877" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.10.0+2" pointer_interceptor_platform_interface: @@ -797,23 +773,23 @@ packages: description: name: pointer_interceptor_platform_interface sha256: "0597b0560e14354baeb23f8375cd612e8bd4841bf8306ecb71fcd0bb78552506" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.10.0+1" pointer_interceptor_web: dependency: transitive description: name: pointer_interceptor_web - sha256: a6237528b46c411d8d55cdfad8fcb3269fc4cbb26060b14bff94879165887d1e - url: "https://pub.flutter-io.cn" + sha256: "9386e064097fd16419e935c23f08f35b58e6aaec155dd39bd6a003b88f9c14b4" + url: "https://pub.dev" source: hosted - version: "0.10.2" + version: "0.10.1+2" pointycastle: dependency: transitive description: name: pointycastle sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.7.4" pull_to_refresh: @@ -821,7 +797,7 @@ packages: description: name: pull_to_refresh sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.0.0" rational: @@ -829,7 +805,7 @@ packages: description: name: rational sha256: ba58e9e18df9abde280e8b10051e4bce85091e41e8e7e411b6cde2e738d357cf - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.2" rxdart: @@ -837,7 +813,7 @@ packages: description: name: rxdart sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.27.7" shared_preferences: @@ -845,7 +821,7 @@ packages: description: name: shared_preferences sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.2" shared_preferences_android: @@ -853,7 +829,7 @@ packages: description: name: shared_preferences_android sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.1" shared_preferences_foundation: @@ -861,7 +837,7 @@ packages: description: name: shared_preferences_foundation sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.5" shared_preferences_linux: @@ -869,7 +845,7 @@ packages: description: name: shared_preferences_linux sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.2" shared_preferences_platform_interface: @@ -877,23 +853,23 @@ packages: description: name: shared_preferences_platform_interface sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" - url: "https://pub.flutter-io.cn" + sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" + url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.2.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.2" sky_engine: @@ -906,7 +882,7 @@ packages: description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.10.0" sprintf: @@ -914,7 +890,7 @@ packages: description: name: sprintf sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "7.0.0" sqflite: @@ -922,23 +898,23 @@ packages: description: name: sqflite sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.3.2" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" - url: "https://pub.flutter-io.cn" + sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" + url: "https://pub.dev" source: hosted - version: "2.5.4" + version: "2.5.3" stack_trace: dependency: transitive description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.11.1" stream_channel: @@ -946,7 +922,7 @@ packages: description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.2" string_scanner: @@ -954,7 +930,7 @@ packages: description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.2.0" synchronized: @@ -962,7 +938,7 @@ packages: description: name: synchronized sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.1.0+1" term_glyph: @@ -970,7 +946,7 @@ packages: description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: @@ -978,7 +954,7 @@ packages: description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.6.1" timeago: @@ -986,7 +962,7 @@ packages: description: name: timeago sha256: d3204eb4c788214883380253da7f23485320a58c11d145babc82ad16bf4e7764 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.6.1" typed_data: @@ -994,7 +970,7 @@ packages: description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.3.2" universal_io: @@ -1002,7 +978,7 @@ packages: description: name: universal_io sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.2.2" uuid: @@ -1010,7 +986,7 @@ packages: description: name: uuid sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "4.3.3" value_layout_builder: @@ -1018,7 +994,7 @@ packages: description: name: value_layout_builder sha256: "98202ec1807e94ac72725b7f0d15027afde513c55c69ff3f41bcfccb950831bc" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "0.3.1" vector_graphics: @@ -1026,7 +1002,7 @@ packages: description: name: vector_graphics sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.1.11+1" vector_graphics_codec: @@ -1034,7 +1010,7 @@ packages: description: name: vector_graphics_codec sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.1.11+1" vector_graphics_compiler: @@ -1042,7 +1018,7 @@ packages: description: name: vector_graphics_compiler sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.1.11+1" vector_math: @@ -1050,39 +1026,31 @@ packages: description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 - url: "https://pub.flutter-io.cn" - source: hosted - version: "13.0.0" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.flutter-io.cn" + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.3.0" win32: dependency: transitive description: name: win32 - sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" - url: "https://pub.flutter-io.cn" + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.2.0" xdg_directories: dependency: transitive description: name: xdg_directories sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "1.0.4" xml: @@ -1090,7 +1058,7 @@ packages: description: name: xml sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "6.5.0" yaml: @@ -1098,9 +1066,9 @@ packages: description: name: yaml sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.flutter-io.cn" + url: "https://pub.dev" source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.2.6 <4.0.0" + flutter: ">=3.16.6"