From b23e085b9221ef7a833d6fbca7652fe7797e6166 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 24 Mar 2021 10:58:49 +0800 Subject: [PATCH] remove common_util --- .../community/activity_detail_model.dart | 2 +- lib/model/community/activity_item_model.dart | 2 +- lib/model/community/event_item_model.dart | 2 +- lib/model/manager/advice_detail_model.dart | 2 +- .../manager/suggestion_or_complain_model.dart | 2 +- .../manager/visitor_list_item_model.dart | 2 +- lib/model/user/user_info_model.dart | 2 +- lib/pages/personal/user_profile_page.dart | 2 +- lib/pages/sign/sign_in_page.dart | 4 +-- .../sign/sign_up/sign_up_verify_page.dart | 4 +-- lib/ui/community/activity/activity_card.dart | 2 +- .../activity/activity_detail_page.dart | 2 +- .../advice/advice_add_comment_page.dart | 2 +- lib/ui/manager/advice/advice_card.dart | 2 +- lib/ui/manager/advice/advice_detail_page.dart | 2 +- lib/ui/manager/advice/new_advice_page.dart | 2 +- .../questionnaire/questionnaire_page.dart | 2 +- lib/ui/manager/visitor/visitor_list_item.dart | 2 +- .../visitor/visitor_passport_page.dart | 2 +- lib/ui/message/message_center.dart | 2 +- lib/utils/bee_date_util.dart | 2 +- pubspec.lock | 34 +++++++++---------- pubspec.yaml | 9 +++-- 23 files changed, 44 insertions(+), 45 deletions(-) diff --git a/lib/model/community/activity_detail_model.dart b/lib/model/community/activity_detail_model.dart index 77f525ab..18c6bd16 100644 --- a/lib/model/community/activity_detail_model.dart +++ b/lib/model/community/activity_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:akuCommunity/model/common/img_model.dart'; diff --git a/lib/model/community/activity_item_model.dart b/lib/model/community/activity_item_model.dart index 66493185..44db35a3 100644 --- a/lib/model/community/activity_item_model.dart +++ b/lib/model/community/activity_item_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:akuCommunity/model/common/img_model.dart'; diff --git a/lib/model/community/event_item_model.dart b/lib/model/community/event_item_model.dart index 36a3df28..db8faac7 100644 --- a/lib/model/community/event_item_model.dart +++ b/lib/model/community/event_item_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:akuCommunity/model/common/img_model.dart'; diff --git a/lib/model/manager/advice_detail_model.dart b/lib/model/manager/advice_detail_model.dart index 439c18b7..3eb4dbf2 100644 --- a/lib/model/manager/advice_detail_model.dart +++ b/lib/model/manager/advice_detail_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:akuCommunity/model/common/img_model.dart'; diff --git a/lib/model/manager/suggestion_or_complain_model.dart b/lib/model/manager/suggestion_or_complain_model.dart index e15dfe7c..36d87f70 100644 --- a/lib/model/manager/suggestion_or_complain_model.dart +++ b/lib/model/manager/suggestion_or_complain_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:akuCommunity/model/common/img_model.dart'; diff --git a/lib/model/manager/visitor_list_item_model.dart b/lib/model/manager/visitor_list_item_model.dart index fbd81818..c09ed8f4 100644 --- a/lib/model/manager/visitor_list_item_model.dart +++ b/lib/model/manager/visitor_list_item_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; class VisitorListItemModel { int id; diff --git a/lib/model/user/user_info_model.dart b/lib/model/user/user_info_model.dart index 32ec3619..750f6b3c 100644 --- a/lib/model/user/user_info_model.dart +++ b/lib/model/user/user_info_model.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; class UserInfoModel { int id; diff --git a/lib/pages/personal/user_profile_page.dart b/lib/pages/personal/user_profile_page.dart index 698400fa..7c4b7d69 100644 --- a/lib/pages/personal/user_profile_page.dart +++ b/lib/pages/personal/user_profile_page.dart @@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/pages/sign/sign_in_page.dart b/lib/pages/sign/sign_in_page.dart index 181d3604..6b51d20a 100644 --- a/lib/pages/sign/sign_in_page.dart +++ b/lib/pages/sign/sign_in_page.dart @@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart' show TextUtil; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -94,7 +94,7 @@ class _SignInPageState extends State { if (response.data['choose'] == 1) { userProvider.setLogin(response.data['token']); cancel(); - Get.offAll(()=>TabNavigator()); + Get.offAll(() => TabNavigator()); } else { cancel(); signUpProvider.setTel(_phone.text); diff --git a/lib/pages/sign/sign_up/sign_up_verify_page.dart b/lib/pages/sign/sign_up/sign_up_verify_page.dart index 7bb01dcc..0303c132 100644 --- a/lib/pages/sign/sign_up/sign_up_verify_page.dart +++ b/lib/pages/sign/sign_up/sign_up_verify_page.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'package:velocity_x/velocity_x.dart'; @@ -86,7 +86,7 @@ class _SignUpVerifyPageState extends State { signUpProvider.setName(_nameController.text); signUpProvider.setIdNumber(_idNumberController.text); bool result = await SignFunc.signUp(); - if (result) Get.offAll(()=>TabNavigator()); + if (result) Get.offAll(() => TabNavigator()); } }, elevation: 0, diff --git a/lib/ui/community/activity/activity_card.dart b/lib/ui/community/activity/activity_card.dart index 0833e347..abe1968b 100644 --- a/lib/ui/community/activity/activity_card.dart +++ b/lib/ui/community/activity/activity_card.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:velocity_x/velocity_x.dart'; import 'package:akuCommunity/const/resource.dart'; diff --git a/lib/ui/community/activity/activity_detail_page.dart b/lib/ui/community/activity/activity_detail_page.dart index b43fe8a1..a478cd12 100644 --- a/lib/ui/community/activity/activity_detail_page.dart +++ b/lib/ui/community/activity/activity_detail_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; import 'package:shimmer/shimmer.dart'; diff --git a/lib/ui/manager/advice/advice_add_comment_page.dart b/lib/ui/manager/advice/advice_add_comment_page.dart index 7f147cf5..06584041 100644 --- a/lib/ui/manager/advice/advice_add_comment_page.dart +++ b/lib/ui/manager/advice/advice_add_comment_page.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/ui/manager/advice/advice_card.dart b/lib/ui/manager/advice/advice_card.dart index 9f20f59e..37d3f443 100644 --- a/lib/ui/manager/advice/advice_card.dart +++ b/lib/ui/manager/advice/advice_card.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/ui/manager/advice/advice_detail_page.dart b/lib/ui/manager/advice/advice_detail_page.dart index de028c14..0c1b7dbe 100644 --- a/lib/ui/manager/advice/advice_detail_page.dart +++ b/lib/ui/manager/advice/advice_detail_page.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:dio/dio.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart' hide Response; diff --git a/lib/ui/manager/advice/new_advice_page.dart b/lib/ui/manager/advice/new_advice_page.dart index 719266b7..567b1cf4 100644 --- a/lib/ui/manager/advice/new_advice_page.dart +++ b/lib/ui/manager/advice/new_advice_page.dart @@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/ui/manager/questionnaire/questionnaire_page.dart b/lib/ui/manager/questionnaire/questionnaire_page.dart index abd8d367..66c0ba4c 100644 --- a/lib/ui/manager/questionnaire/questionnaire_page.dart +++ b/lib/ui/manager/questionnaire/questionnaire_page.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:akuCommunity/base/base_style.dart'; diff --git a/lib/ui/manager/visitor/visitor_list_item.dart b/lib/ui/manager/visitor/visitor_list_item.dart index 4fa1d783..78b227fb 100644 --- a/lib/ui/manager/visitor/visitor_list_item.dart +++ b/lib/ui/manager/visitor/visitor_list_item.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:velocity_x/velocity_x.dart'; import 'package:akuCommunity/model/manager/visitor_list_item_model.dart'; diff --git a/lib/ui/manager/visitor/visitor_passport_page.dart b/lib/ui/manager/visitor/visitor_passport_page.dart index f48c8a0e..44899b39 100644 --- a/lib/ui/manager/visitor/visitor_passport_page.dart +++ b/lib/ui/manager/visitor/visitor_passport_page.dart @@ -6,7 +6,7 @@ import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:bot_toast/bot_toast.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:fluwx/fluwx.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/ui/message/message_center.dart b/lib/ui/message/message_center.dart index b7743da3..561112b8 100644 --- a/lib/ui/message/message_center.dart +++ b/lib/ui/message/message_center.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:badges/badges.dart'; -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; import 'package:dio/dio.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/utils/bee_date_util.dart b/lib/utils/bee_date_util.dart index c10de6ad..aab70050 100644 --- a/lib/utils/bee_date_util.dart +++ b/lib/utils/bee_date_util.dart @@ -1,4 +1,4 @@ -import 'package:common_utils/common_utils.dart'; +import 'package:flustars/flustars.dart'; class BeeDateUtil { DateTime date; diff --git a/pubspec.lock b/pubspec.lock index b90abfde..814a77f4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -98,7 +98,7 @@ packages: name: badges url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.6" + version: "2.0.0-nullsafety.1" boolean_selector: dependency: transitive description: @@ -112,14 +112,14 @@ packages: name: bot_toast url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.5" + version: "4.0.1" cached_network_image: dependency: "direct main" description: name: cached_network_image url: "https://pub.flutter-io.cn" source: hosted - version: "2.5.0" + version: "3.0.0-nullsafety" characters: dependency: transitive description: @@ -177,12 +177,12 @@ packages: source: hosted version: "2.0.0" common_utils: - dependency: "direct main" + dependency: transitive description: name: common_utils url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.1" + version: "2.0.2" console_log_handler: dependency: transitive description: @@ -196,7 +196,7 @@ packages: name: convert url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "3.0.0" core_location_fluttify: dependency: transitive description: @@ -245,7 +245,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: @@ -329,7 +329,7 @@ packages: name: flustars url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.3" + version: "2.0.1" flutter: dependency: "direct main" description: flutter @@ -348,14 +348,14 @@ packages: name: flutter_blurhash url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.0" + version: "0.5.4-nullsafety.0" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.2" + version: "3.0.0-nullsafety.2" flutter_datetime_picker: dependency: "direct main" description: @@ -708,7 +708,7 @@ packages: name: octo_image url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "1.0.0-nullsafety.1" package_config: dependency: transitive description: @@ -899,7 +899,7 @@ packages: name: rational url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.8" + version: "1.0.0" redux: dependency: transitive description: @@ -913,7 +913,7 @@ packages: name: rxdart url: "https://pub.flutter-io.cn" source: hosted - version: "0.25.0" + version: "0.26.0" shared_preferences: dependency: transitive description: @@ -988,21 +988,21 @@ packages: name: sp_util url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "2.0.3" sqflite: dependency: transitive description: name: sqflite url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.2+2" + version: "2.0.0+3" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.3" + version: "2.0.0+2" stack_trace: dependency: transitive description: @@ -1037,7 +1037,7 @@ packages: name: synchronized url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.0+2" + version: "3.0.0" term_glyph: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 71c4136e..45ae466d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,8 +32,7 @@ dependencies: # UI库 flui: 0.9.2 # 工具类 - flustars: - common_utils: + flustars: ^2.0.1 # icons flutter_icons: 1.1.0 extended_text: ^5.0.4 @@ -46,11 +45,11 @@ dependencies: #图片预览 photo_view: ^0.10.2 #图片缓存 - cached_network_image: ^2.3.1 + cached_network_image: ^3.0.0-nullsafety #头像层叠 image_stack: ^1.1.0 #弹窗 - bot_toast: ^3.0.5 + bot_toast: ^4.0.1 #加载html flutter_html: ^1.0.2 #上拉滑动 @@ -94,7 +93,7 @@ dependencies: git: url: http://159.75.73.143:8080/third_packages/jpush_flutter - badges: ^1.1.6 + badges: ^2.0.0-nullsafety.1 dev_dependencies: flutter_test: