diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 8971807..07d62f9 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,3 +1,3 @@ { - "flutterSdkVersion": "1.22.6" + "flutterSdkVersion": "2.0.2" } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index b711e13..2ccc2b5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "dart.flutterSdkPath": "/Users/zhangmeng/fvm/versions/1.22.6" + "dart.flutterSdkPath": "/Users/zhangmeng/fvm/versions/2.0.2" } \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 63c5407..e16211c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; import 'package:amap_map_fluttify/amap_map_fluttify.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:provider/provider.dart'; @@ -53,32 +54,37 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MultiProvider( - providers: [ - ChangeNotifierProvider(create: (context) => UserProvider()), - ChangeNotifierProvider(create: (context) => AppProvider()), - ChangeNotifierProvider(create: (context) => FixProvider()), - ChangeNotifierProvider(create: (context) => GreenManageProvider()), - ChangeNotifierProvider(create: (context) => InspectionManageProvider()), - ChangeNotifierProvider(create: (context) => GreenManageProvider()), - ChangeNotifierProvider(create: (context) => InspectionManageProvider()), - ChangeNotifierProvider(create: (context) => AnouncementProvider()), - ], - child: GetMaterialApp( - title: '小蜜蜂管家', - home: SplashPage(), - builder: BotToastInit(), - navigatorObservers: [ - BotToastNavigatorObserver(), + providers: [ + ChangeNotifierProvider(create: (context) => UserProvider()), + ChangeNotifierProvider(create: (context) => AppProvider()), + ChangeNotifierProvider(create: (context) => FixProvider()), + ChangeNotifierProvider(create: (context) => GreenManageProvider()), + ChangeNotifierProvider( + create: (context) => InspectionManageProvider()), + ChangeNotifierProvider(create: (context) => GreenManageProvider()), + ChangeNotifierProvider( + create: (context) => InspectionManageProvider()), + ChangeNotifierProvider(create: (context) => AnouncementProvider()), ], - localizationsDelegates: [ - GlobalCupertinoLocalizations.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - supportedLocales: [ - const Locale('zh'), - ], - ), - ); + child: ScreenUtilInit( + designSize: Size(750, 1334), + builder: () { + return GetMaterialApp( + title: '小蜜蜂管家', + home: SplashPage(), + builder: BotToastInit(), + navigatorObservers: [ + BotToastNavigatorObserver(), + ], + localizationsDelegates: [ + GlobalCupertinoLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ], + supportedLocales: [ + const Locale('zh'), + ], + ); + })); } } diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 34ffbdb..4763379 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -143,8 +143,6 @@ class _HomePageState extends State { Widget build(BuildContext context) { final userProvider = Provider.of(context); final _anouncementProvider = Provider.of(context); - ScreenUtil.init(context, - designSize: Size(750, 1334), allowFontScaling: true); return AnnotatedRegion( child: Scaffold( drawer: PersonalDraw(), diff --git a/lib/ui/home/messages/message.dart b/lib/ui/home/messages/message.dart index e5cbce6..3db2437 100644 --- a/lib/ui/home/messages/message.dart +++ b/lib/ui/home/messages/message.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:aku_ui/aku_ui.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:get/get.dart'; +import 'package:get/get.dart' hide Response; import 'package:get/instance_manager.dart'; // Project imports: diff --git a/lib/ui/login/login_sms_page.dart b/lib/ui/login/login_sms_page.dart index b6ff033..13e0d0e 100644 --- a/lib/ui/login/login_sms_page.dart +++ b/lib/ui/login/login_sms_page.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:aku_ui/common_widgets/aku_material_button.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; -import 'package:get/get.dart'; +import 'package:get/get.dart' hide Response; import 'package:pin_input_text_field/pin_input_text_field.dart'; import 'package:provider/provider.dart'; diff --git a/lib/ui/splash/splash_page.dart b/lib/ui/splash/splash_page.dart index 9842c2f..9900ee8 100644 --- a/lib/ui/splash/splash_page.dart +++ b/lib/ui/splash/splash_page.dart @@ -51,8 +51,6 @@ class _SplashPageState extends State { @override Widget build(BuildContext context) { - ScreenUtil.init(context, - designSize: Size(750, 1334), allowFontScaling: true); return Scaffold( body: Center( child: Image.asset(R.ASSETS_PLACEHOLDER_WEBP), diff --git a/lib/ui/sub_pages/decoration_manager/decoration_manager_detail_page.dart b/lib/ui/sub_pages/decoration_manager/decoration_manager_detail_page.dart index 60f71a0..1b7c3da 100644 --- a/lib/ui/sub_pages/decoration_manager/decoration_manager_detail_page.dart +++ b/lib/ui/sub_pages/decoration_manager/decoration_manager_detail_page.dart @@ -624,6 +624,7 @@ class _DecorationManagerDetailStatePage ), ], ), + collapsed: null, ), ); }).toList(), diff --git a/lib/utils/network/net_util.dart b/lib/utils/network/net_util.dart index a34f8dd..971e2bc 100644 --- a/lib/utils/network/net_util.dart +++ b/lib/utils/network/net_util.dart @@ -3,11 +3,10 @@ import 'dart:io'; // Package imports: import 'package:aku_community_manager/provider/user_provider.dart'; -import 'package:aku_community_manager/ui/home/home_page.dart'; import 'package:aku_community_manager/ui/login/login_page.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:dio/dio.dart'; -import 'package:get/get.dart'; +import 'package:get/get.dart' hide Response, FormData, MultipartFile; import 'package:power_logger/power_logger.dart'; // Project imports: diff --git a/pubspec.lock b/pubspec.lock index ad586f5..16942ec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -58,7 +58,7 @@ packages: name: animator url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.2" + version: "3.0.0" args: dependency: transitive description: @@ -72,7 +72,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" auto_size_text: dependency: transitive description: @@ -80,41 +80,48 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" + auto_size_text_pk: + dependency: transitive + description: + name: auto_size_text_pk + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" bot_toast: dependency: "direct main" description: name: bot_toast url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.4" + version: "4.0.1" carousel_slider: dependency: "direct main" description: name: carousel_slider url: "https://pub.flutter-io.cn" source: hosted - version: "2.3.1" + version: "4.0.0-nullsafety.0" characters: dependency: transitive description: name: characters url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" cli_util: dependency: transitive description: @@ -128,14 +135,14 @@ packages: name: clock url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.flutter-io.cn" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" colorize: dependency: transitive description: @@ -149,14 +156,14 @@ packages: name: common_utils url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.1" + version: "2.0.2" convert: dependency: transitive description: name: convert url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "3.0.0" core_location_fluttify: dependency: transitive description: @@ -170,14 +177,14 @@ packages: name: crypto url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.5" + version: "3.0.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.0.2" dart_style: dependency: transitive description: @@ -191,7 +198,7 @@ packages: name: decimal url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.5" + version: "1.0.0" device_info: dependency: transitive description: @@ -219,28 +226,28 @@ packages: name: expandable url: "https://pub.flutter-io.cn" source: hosted - version: "4.1.4" + version: "5.0.1" extended_text: dependency: "direct main" description: name: extended_text url: "https://pub.flutter-io.cn" source: hosted - version: "4.0.0" + version: "5.0.4" extended_text_library: dependency: transitive description: name: extended_text_library url: "https://pub.flutter-io.cn" source: hosted - version: "4.0.1" + version: "5.0.2" fake_async: dependency: transitive description: name: fake_async url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" file: dependency: transitive description: @@ -292,14 +299,14 @@ packages: name: flutter_rating_bar url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.1+1" + version: "4.0.0" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.0" + version: "5.0.0-nullsafety.11" flutter_test: dependency: "direct dev" description: flutter @@ -323,7 +330,7 @@ packages: name: get url: "https://pub.flutter-io.cn" source: hosted - version: "3.15.0" + version: "4.0.0-nullsafety.2" glob: dependency: transitive description: @@ -351,7 +358,7 @@ packages: name: hive url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.4+1" + version: "1.6.0-nullsafety.2" hive_flutter: dependency: "direct main" description: @@ -400,7 +407,7 @@ packages: name: intl url: "https://pub.flutter-io.cn" source: hosted - version: "0.16.1" + version: "0.17.0" io: dependency: transitive description: @@ -411,9 +418,11 @@ packages: jpush_flutter: dependency: "direct main" description: - name: jpush_flutter - url: "https://pub.flutter-io.cn" - source: hosted + path: "." + ref: HEAD + resolved-ref: c713c4be12073302b6f1b5c7a71199046a3ee47c + url: "http://159.75.73.143:8080/third_packages/jpush_flutter" + source: git version: "0.6.3" js: dependency: transitive @@ -421,35 +430,35 @@ packages: name: js url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.2" + version: "0.6.3" logger: dependency: "direct main" description: name: logger url: "https://pub.flutter-io.cn" source: hosted - version: "0.9.4" + version: "1.0.0" matcher: dependency: transitive description: name: matcher url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" nested: dependency: transitive description: name: nested url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.4" + version: "1.0.0" node_interop: dependency: transitive description: @@ -484,7 +493,7 @@ packages: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" path_provider: dependency: transitive description: @@ -533,14 +542,14 @@ packages: name: pin_input_text_field url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.1" + version: "4.0.0" platform: dependency: transitive description: name: platform url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.1" + version: "3.0.0" plugin_platform_interface: dependency: transitive description: @@ -554,7 +563,7 @@ packages: name: power_logger url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.1" + version: "0.1.3" pretty_json: dependency: transitive description: @@ -568,7 +577,7 @@ packages: name: provider url: "https://pub.flutter-io.cn" source: hosted - version: "4.3.2+2" + version: "5.0.0" pub_semver: dependency: transitive description: @@ -582,14 +591,14 @@ packages: name: qr_code_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.4" + version: "0.4.0-nullsafety.0" rational: dependency: transitive description: name: rational url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.8" + version: "1.0.0" sky_engine: dependency: transitive description: flutter @@ -601,56 +610,56 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.flutter-io.cn" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" states_rebuilder: dependency: transitive description: name: states_rebuilder url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.0" + version: "4.0.0+1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" url_launcher: dependency: "direct main" description: @@ -699,21 +708,21 @@ packages: name: vector_math url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" velocity_x: dependency: "direct main" description: name: velocity_x url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.1" + version: "2.6.0" vxstate: dependency: transitive description: name: vxstate url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "2.0.1" watcher: dependency: transitive description: @@ -729,5 +738,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" - flutter: ">=1.22.0 <2.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 95976d7..05e9c95 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,33 +13,33 @@ dependencies: sdk: flutter flutter_localizations: sdk: flutter - cupertino_icons: ^1.0.0 + cupertino_icons: ^1.0.2 #屏幕适配 - flutter_screenutil: ^3.2.0 + flutter_screenutil: ^5.0.0-nullsafety.11 #状态管理 - provider: ^4.3.2+2 + provider: ^5.0.0 #路由 - get: ^3.15.0 + get: ^4.0.0-nullsafety.2 #刷新 flutter_easyrefresh: ^2.1.6 #划动组件 - carousel_slider: ^2.3.1 + carousel_slider: ^4.0.0-nullsafety.0 #qrcode san - qr_code_scanner: ^0.3.4 + qr_code_scanner: ^0.4.0-nullsafety.0 #toast - bot_toast: ^3.0.4 + bot_toast: ^4.0.1 - extended_text: ^4.0.0 + extended_text: ^5.0.4 - common_utils: ^1.2.1 + common_utils: ^2.0.2 #验证码 - pin_input_text_field: ^3.1.1 + pin_input_text_field: ^4.0.0 image_picker: ^0.6.7+12 - flutter_rating_bar: ^3.0.1+1 + flutter_rating_bar: ^4.0.0 - expandable: ^4.1.4 + expandable: ^5.0.1 url_launcher: ^5.7.10 @@ -47,19 +47,21 @@ dependencies: permission_handler: ^5.0.1+1 - velocity_x: ^1.3.1 + velocity_x: ^2.6.0 dio: - power_logger: ^0.1.1 - logger: ^0.9.4 + power_logger: ^0.1.3 + logger: ^1.0.0 aku_ui: git: url: http://test.akuhotel.com:8099/aku_fe/aku_ui.git hive: ^1.4.4+1 hive_flutter: ^0.3.1 - jpush_flutter: ^0.6.3 + jpush_flutter: + git: + url: http://159.75.73.143:8080/third_packages/jpush_flutter dev_dependencies: flutter_test: