From e521e66e9fa708e7955fbe656cd17f0e5433ce0a Mon Sep 17 00:00:00 2001 From: datang Date: Mon, 16 May 2022 10:02:59 +0800 Subject: [PATCH] push --- lib/constants/profile_api.dart | 2 +- lib/generated_plugin_registrant.dart | 1 - lib/main.dart | 2 +- .../facility_preorder_date_picker.dart | 7 ++-- .../facility/facility_preorder_page.dart | 33 ++++++++++++------- .../work_order/history_report_page.dart | 2 +- lib/widget/picker/bee_day_picker.dart | 2 +- pubspec.lock | 18 +++++----- 8 files changed, 38 insertions(+), 29 deletions(-) diff --git a/lib/constants/profile_api.dart b/lib/constants/profile_api.dart index 54fce71a..297552a5 100644 --- a/lib/constants/profile_api.dart +++ b/lib/constants/profile_api.dart @@ -22,7 +22,7 @@ class _MyHouse { class _MyFamily { ///查询房屋当前成员 - String get myFamilyMember => '/app/user/myFamily/findCurrentMembers'; + String get myFamilyMember => '/app/user/myFamily/findCurrentMembers'; ///查询当前用户的审核列表 String get myFamilyExamine => '/app/user/myFamily/findCurrentUserApply'; diff --git a/lib/generated_plugin_registrant.dart b/lib/generated_plugin_registrant.dart index 366ed6c3..8398580d 100644 --- a/lib/generated_plugin_registrant.dart +++ b/lib/generated_plugin_registrant.dart @@ -4,7 +4,6 @@ // ignore_for_file: directives_ordering // ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: depend_on_referenced_packages import 'package:audio_session/audio_session_web.dart'; import 'package:device_info_plus_web/device_info_plus_web.dart'; diff --git a/lib/main.dart b/lib/main.dart index 774eb5ea..46763728 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -52,7 +52,7 @@ class _MyAppState extends State { } }, child: MediaQuery( - data: MediaQueryData.fromWindow(WidgetsBinding.instance.window), + data: MediaQueryData.fromWindow(WidgetsBinding.instance!.window), child: ScreenUtilInit( designSize: Size(750, 1334), // minTextAdapt: true, diff --git a/lib/ui/community/facility/facility_preorder_date_picker.dart b/lib/ui/community/facility/facility_preorder_date_picker.dart index 4f4fb5c7..68a47bc6 100644 --- a/lib/ui/community/facility/facility_preorder_date_picker.dart +++ b/lib/ui/community/facility/facility_preorder_date_picker.dart @@ -36,12 +36,13 @@ class _FacilityPreorderDatePickerState List _selectIndex = []; + @override Widget build(BuildContext context) { return BeeChooseDatePicker( height: 700.h, onPressed: () { - Get.back(); + Get.back(result: _selectIndex); }, body: Container( height: 600.h, @@ -82,7 +83,7 @@ class _FacilityPreorderDatePickerState return GestureDetector( onTap: () { print(getNum(start)+index); - if(!models.contains(getNum(start)+index)||start.add(Duration(minutes: 30 * index)).isAfter(DateTime.now())){ + if(!models.contains(getNum(start)+index)||isPass(start.add(Duration(minutes: 30 * index)))){ if (_selectIndex.contains(index)) { _selectIndex.remove(index); } else { @@ -97,7 +98,7 @@ class _FacilityPreorderDatePickerState BeeCheckRadio( value: index, groupValue: _selectIndex, - canCheck: models.contains(getNum(start)+index), + canCheck: models.contains(getNum(start)+index)||isPass(start.add(Duration(minutes: 30 * index))), ), 30.wb, Text( diff --git a/lib/ui/community/facility/facility_preorder_page.dart b/lib/ui/community/facility/facility_preorder_page.dart index f76b0016..a43a640e 100644 --- a/lib/ui/community/facility/facility_preorder_page.dart +++ b/lib/ui/community/facility/facility_preorder_page.dart @@ -47,23 +47,29 @@ class _FacilityPreorderPageState extends State { final userProvider = Provider.of(context); return BeeScaffold( title: '添加预订', - bodyColor: Colors.white, systemStyle: SystemStyle.yellowBottomBar, body: ListView( padding: EdgeInsets.symmetric(vertical: 32.w), children: [ - Text('业主房屋').pSymmetric(h: 32.w), - ListTile( - leading: Image.asset( - R.ASSETS_ICONS_HOUSE_PNG, - height: 60.w, - width: 60.w, + Container( + color: Colors.white, + child:ListTile( + leading: Image.asset( + R.ASSETS_ICONS_HOUSE_PNG, + height: 60.w, + width: 60.w, + ), + onTap: () => Get.to(() => AdviceHousePage()), + title: Text(S.of(context)!.tempPlotName), + subtitle: Text(userProvider.defaultHouse!.addressName), + trailing: Icon(CupertinoIcons.chevron_forward), ), - onTap: () => Get.to(() => AdviceHousePage()), - title: Text(S.of(context)!.tempPlotName), - subtitle: Text(userProvider.defaultHouse!.addressName), - trailing: Icon(CupertinoIcons.chevron_forward), ), + + + + Text('业主房屋').pSymmetric(h: 32.w), + BeeDivider( indent: 32.w, endIndent: 32.w, @@ -99,9 +105,12 @@ class _FacilityPreorderPageState extends State { height: 120.w, onPressed: () async { DateTime? date = await BeeDayPicker.pick(DateTime.now()); - await Get.bottomSheet(FacilityPreorderDatePicker(typeModel: widget.typeModel,)); + print(date); if (date != null) { startDate = date; + Get.bottomSheet(FacilityPreorderDatePicker(typeModel: widget.typeModel,)); + List dateList=FacilityPreorderDatePicker(typeModel: widget.typeModel) as List; + print(dateList); setState(() {}); } }, diff --git a/lib/ui/function_and_service/work_order/history_report_page.dart b/lib/ui/function_and_service/work_order/history_report_page.dart index 382e8433..157549c7 100644 --- a/lib/ui/function_and_service/work_order/history_report_page.dart +++ b/lib/ui/function_and_service/work_order/history_report_page.dart @@ -106,7 +106,7 @@ class _LineCardState extends State { @override void didChangeDependencies() { - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + WidgetsBinding.instance!.addPostFrameCallback((timeStamp) { _height = context.size?.height ?? 0; print(context.size?.height); setState(() {}); diff --git a/lib/widget/picker/bee_day_picker.dart b/lib/widget/picker/bee_day_picker.dart index a944735d..78270ef2 100644 --- a/lib/widget/picker/bee_day_picker.dart +++ b/lib/widget/picker/bee_day_picker.dart @@ -55,7 +55,7 @@ class __BeeDayPickerState extends State<_BeeDayPicker> { Widget build(BuildContext context) { return BeeChooseDatePicker( onPressed: () async{ - Get.back(); + Get.back(result: _date); // await FacilityPreorderDatePicker(); }, body: CupertinoDatePicker( diff --git a/pubspec.lock b/pubspec.lock index 048266e0..81551d49 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -245,7 +245,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.16.0" + version: "1.15.0" color: dependency: transitive description: @@ -408,7 +408,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.2.0" ffi: dependency: transitive description: @@ -717,7 +717,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.3" json_annotation: dependency: "direct main" description: @@ -787,7 +787,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.3" meta: dependency: transitive description: @@ -892,7 +892,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.0" path_drawing: dependency: transitive description: @@ -1172,7 +1172,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.8.1" sqflite: dependency: transitive description: @@ -1235,7 +1235,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.8" time: dependency: transitive description: @@ -1340,7 +1340,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.1" velocity_x: dependency: "direct main" description: @@ -1405,5 +1405,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.15.0 <3.0.0" flutter: ">=2.8.0"