diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 0e02fff..009b4ea 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -2,11 +2,6 @@ /// ***************************************************** /// FlutterGen /// ***************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import - import 'package:flutter/widgets.dart'; class $AssetsIconsGen { diff --git a/lib/main.dart b/lib/main.dart index a7c9aed..8ffc405 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,32 +1,22 @@ import 'dart:async'; -import 'dart:io'; import 'package:bot_toast/bot_toast.dart'; - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_xupdate/flutter_xupdate.dart'; - import 'package:fluwx/fluwx.dart'; import 'package:get/get_navigation/src/root/get_material_app.dart'; import 'package:permission_handler/permission_handler.dart'; - - import 'package:project_telephony/providers/phone_num_provider.dart'; - import 'package:project_telephony/providers/user_provider.dart'; - import 'package:project_telephony/ui/loading.dart'; - import 'package:project_telephony/ui/tab_navigator.dart'; import 'package:project_telephony/utils/developer_util.dart'; +import 'package:project_telephony/utils/hive_store.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:telephony/telephony.dart'; -import 'package:project_telephony/utils/hive_store.dart'; void main() async { const buildType = String.fromEnvironment('BUILD_TYPE'); diff --git a/lib/model/contant_list_model.dart b/lib/model/contant_list_model.dart index c62e21e..38bef21 100644 --- a/lib/model/contant_list_model.dart +++ b/lib/model/contant_list_model.dart @@ -1,5 +1,6 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + part 'contant_list_model.g.dart'; diff --git a/lib/model/exclude_phone_model.dart b/lib/model/exclude_phone_model.dart index e783ef2..b1bebd2 100644 --- a/lib/model/exclude_phone_model.dart +++ b/lib/model/exclude_phone_model.dart @@ -1,5 +1,5 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; part 'exclude_phone_model.g.dart'; diff --git a/lib/model/hive/ContentHive.dart b/lib/model/hive/ContentHive.dart index 0e3c3b4..7965981 100644 --- a/lib/model/hive/ContentHive.dart +++ b/lib/model/hive/ContentHive.dart @@ -1,8 +1,9 @@ +import 'package:equatable/equatable.dart'; import 'package:hive/hive.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:equatable/equatable.dart'; import 'content_list_model.dart'; + part 'ContentHive.g.dart'; diff --git a/lib/model/hive/content_list_model.dart b/lib/model/hive/content_list_model.dart index c8ae6f2..ff03ee0 100644 --- a/lib/model/hive/content_list_model.dart +++ b/lib/model/hive/content_list_model.dart @@ -1,5 +1,6 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + part 'content_list_model.g.dart'; diff --git a/lib/model/hive/phone_model.dart b/lib/model/hive/phone_model.dart index c5dbcff..a941900 100644 --- a/lib/model/hive/phone_model.dart +++ b/lib/model/hive/phone_model.dart @@ -1,6 +1,6 @@ +import 'package:equatable/equatable.dart'; import 'package:hive/hive.dart'; import 'package:json_annotation/json_annotation.dart'; -import 'package:equatable/equatable.dart'; part 'phone_model.g.dart'; diff --git a/lib/model/network/api_client.dart b/lib/model/network/api_client.dart index 59a57b7..81a3744 100644 --- a/lib/model/network/api_client.dart +++ b/lib/model/network/api_client.dart @@ -1,6 +1,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/foundation.dart'; import 'package:platform/platform.dart'; + import '../../constants/api.dart'; import '../../utils/inner_model/base_list_model.dart'; import '../../utils/toast/cloud_toast.dart'; diff --git a/lib/model/network/net_interceptor.dart b/lib/model/network/net_interceptor.dart index fd925bb..eaa26d2 100644 --- a/lib/model/network/net_interceptor.dart +++ b/lib/model/network/net_interceptor.dart @@ -2,6 +2,7 @@ import 'package:dio/dio.dart'; import 'package:get/get.dart' hide Response; import 'package:power_logger/power_logger.dart'; import 'package:provider/provider.dart'; + import '../../providers/user_provider.dart'; import '../../ui/login/login_page.dart'; import '../../utils/toast/cloud_toast.dart'; diff --git a/lib/model/phone_num_model.dart b/lib/model/phone_num_model.dart index d00c970..251bc64 100644 --- a/lib/model/phone_num_model.dart +++ b/lib/model/phone_num_model.dart @@ -1,5 +1,6 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + part 'phone_num_model.g.dart'; @JsonSerializable() diff --git a/lib/model/sms_content_model.dart b/lib/model/sms_content_model.dart index fdb527e..4c43746 100644 --- a/lib/model/sms_content_model.dart +++ b/lib/model/sms_content_model.dart @@ -1,5 +1,6 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + part 'sms_content_model.g.dart'; diff --git a/lib/model/state_model.dart b/lib/model/state_model.dart index e906995..0adb27c 100644 --- a/lib/model/state_model.dart +++ b/lib/model/state_model.dart @@ -1,5 +1,6 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; + part 'state_model.g.dart'; diff --git a/lib/model/update_model.dart b/lib/model/update_model.dart index 1086f93..9660eb8 100644 --- a/lib/model/update_model.dart +++ b/lib/model/update_model.dart @@ -1,5 +1,5 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; part 'update_model.g.dart'; diff --git a/lib/model/user_info_model.dart b/lib/model/user_info_model.dart index c9643e2..ee59c15 100644 --- a/lib/model/user_info_model.dart +++ b/lib/model/user_info_model.dart @@ -1,5 +1,5 @@ -import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; +import 'package:json_annotation/json_annotation.dart'; part 'user_info_model.g.dart'; diff --git a/lib/providers/phone_num_provider.dart b/lib/providers/phone_num_provider.dart index 6aabb28..730d7cd 100644 --- a/lib/providers/phone_num_provider.dart +++ b/lib/providers/phone_num_provider.dart @@ -1,8 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_contacts/flutter_contacts.dart'; - - import 'package:project_telephony/utils/hive_store.dart'; import '../model/hive/phone_model.dart'; diff --git a/lib/ui/TextMe/address_book.dart b/lib/ui/TextMe/address_book.dart index c5efe19..768ddd7 100644 --- a/lib/ui/TextMe/address_book.dart +++ b/lib/ui/TextMe/address_book.dart @@ -1,13 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; - import 'package:project_telephony/model/hive/phone_model.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/hive_store.dart'; import '../../base/base_style.dart'; - import '../widget/plone_back_button.dart'; import '../widget/plone_bottom.dart'; import 'call_list_page.dart'; diff --git a/lib/ui/TextMe/call_list_page.dart b/lib/ui/TextMe/call_list_page.dart index 8636e43..d52a2c9 100644 --- a/lib/ui/TextMe/call_list_page.dart +++ b/lib/ui/TextMe/call_list_page.dart @@ -7,7 +7,6 @@ import '../../base/base_style.dart'; import '../../model/hive/phone_model.dart'; import '../exclude/exclude_contacts_page.dart'; import '../exclude/exclude_single_page.dart'; - import '../widget/plone_back_button.dart'; class CallListPage extends StatefulWidget { diff --git a/lib/ui/TextMe/text_me_page.dart b/lib/ui/TextMe/text_me_page.dart index 2f1432d..8123aef 100644 --- a/lib/ui/TextMe/text_me_page.dart +++ b/lib/ui/TextMe/text_me_page.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_sms/flutter_sms.dart'; - import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/ui/TextMe/text_template.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart'; diff --git a/lib/ui/TextMe/text_template.dart b/lib/ui/TextMe/text_template.dart index dd1b088..7422f54 100644 --- a/lib/ui/TextMe/text_template.dart +++ b/lib/ui/TextMe/text_template.dart @@ -6,10 +6,8 @@ import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/user_tool.dart'; import 'package:shared_preferences/shared_preferences.dart'; - import '../../base/base_style.dart'; import '../home/add_sms_page.dart'; - import '../widget/plone_back_button.dart'; typedef TextCallback = Function(String content); diff --git a/lib/ui/home/add_sms_page.dart b/lib/ui/home/add_sms_page.dart index c083b51..4ffe251 100644 --- a/lib/ui/home/add_sms_page.dart +++ b/lib/ui/home/add_sms_page.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; - import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -9,7 +8,6 @@ import '../../base/base_style.dart'; import '../../constants/api.dart'; import '../../model/network/api_client.dart'; import '../../model/network/base_model.dart'; - import '../../providers/user_provider.dart'; import '../../utils/toast/cloud_toast.dart'; import '../user/content_details_page.dart'; diff --git a/lib/ui/home/answer_idle.dart b/lib/ui/home/answer_idle.dart index 8e052b2..b173133 100644 --- a/lib/ui/home/answer_idle.dart +++ b/lib/ui/home/answer_idle.dart @@ -1,5 +1,4 @@ import 'package:bot_toast/bot_toast.dart'; - import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:project_telephony/utils/headers.dart'; diff --git a/lib/ui/home/call.dart b/lib/ui/home/call.dart index 7beac65..a10f225 100644 --- a/lib/ui/home/call.dart +++ b/lib/ui/home/call.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:ui'; + import 'package:call_log/call_log.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_background_service/flutter_background_service.dart'; diff --git a/lib/ui/home/calling_idle_list.dart b/lib/ui/home/calling_idle_list.dart index 0940ecc..99c6337 100644 --- a/lib/ui/home/calling_idle_list.dart +++ b/lib/ui/home/calling_idle_list.dart @@ -1,5 +1,4 @@ import 'package:bot_toast/bot_toast.dart'; - import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:project_telephony/utils/headers.dart'; diff --git a/lib/ui/home/content_connect_page.dart b/lib/ui/home/content_connect_page.dart index 73d8366..2a64b32 100644 --- a/lib/ui/home/content_connect_page.dart +++ b/lib/ui/home/content_connect_page.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/ui/home/calling_idle_list.dart'; - import 'package:project_telephony/ui/widget/plone_back_button.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:tab_indicator_styler/tab_indicator_styler.dart'; diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index d7c8929..81fe583 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:bot_toast/bot_toast.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:package_info/package_info.dart'; @@ -10,6 +10,7 @@ import 'package:project_telephony/ui/home/set/phone_set_page.dart'; import 'package:project_telephony/ui/user/privacy_rights_page.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:url_launcher/url_launcher.dart'; + import '../user/privacy_rights_page.dart'; import 'content_connect_page.dart'; import 'content_refuse_page.dart'; @@ -56,18 +57,18 @@ class _HomePageState extends State with WidgetsBindingObserver { callLog = await Permission.callLog.request().isGranted; addressBook = await Permission.contacts.request().isGranted; kg = await service.isRunning(); - // setState(() {}); + setState(() {}); } getUpdate() async { PackageInfo packageInfo = await PackageInfo.fromPlatform(); - String version = packageInfo.version; //版本号 + // String version = packageInfo.version; //版本号 String buildNumber = packageInfo.buildNumber; //版本构建号 var res = await UserInfoFunc.getUpdate(); - print("版本号$version"); - print('版本构建号$buildNumber'); - print("服务器上的${res.versionCode}"); - print("服务器上的${res.versionName}"); + // print("版本号$version"); + // print('版本构建号$buildNumber'); + // print("服务器上的${res.versionCode}"); + // print("服务器上的${res.versionName}"); if (res.versionCode > int.parse(buildNumber)) { // CloudToast.show("是否进行版本更新"); showDialog( diff --git a/lib/ui/home/set/func/exclude_contacts_func.dart b/lib/ui/home/set/func/exclude_contacts_func.dart index 14e8bac..c090819 100644 --- a/lib/ui/home/set/func/exclude_contacts_func.dart +++ b/lib/ui/home/set/func/exclude_contacts_func.dart @@ -2,6 +2,7 @@ import 'package:project_telephony/constants/api.dart'; import 'package:project_telephony/model/network/api_client.dart'; import 'package:project_telephony/model/network/base_model.dart'; import 'package:project_telephony/utils/inner_model/base_list_model.dart'; + import '../../../../model/exclude_phone_model.dart'; import '../../../../utils/toast/cloud_toast.dart'; diff --git a/lib/ui/home/set/phone_num_list/call_records_list.dart b/lib/ui/home/set/phone_num_list/call_records_list.dart index 462ac86..24a1169 100644 --- a/lib/ui/home/set/phone_num_list/call_records_list.dart +++ b/lib/ui/home/set/phone_num_list/call_records_list.dart @@ -6,6 +6,7 @@ import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/ui/home/set/func/exclude_contacts_func.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:shared_preferences/shared_preferences.dart'; + import '../../../../model/phone_num_model.dart'; import '../../../../utils/toast/cloud_toast.dart'; import '../../../widget/scaffold_theme_widget.dart'; diff --git a/lib/ui/home/set/phone_set_page.dart b/lib/ui/home/set/phone_set_page.dart index 158048e..2d9dd8b 100644 --- a/lib/ui/home/set/phone_set_page.dart +++ b/lib/ui/home/set/phone_set_page.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_background_service/flutter_background_service.dart'; +import 'package:flutter_contacts/flutter_contacts.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:project_telephony/ui/home/set/specify_phone_page.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/user_tool.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:flutter_contacts/flutter_contacts.dart'; -import '../../../base/base_style.dart'; +import '../../../base/base_style.dart'; import '../../widget/plone_back_button.dart'; // class setItem{ diff --git a/lib/ui/home/set/specify_phone_page.dart b/lib/ui/home/set/specify_phone_page.dart index 29467d2..9bd0c91 100644 --- a/lib/ui/home/set/specify_phone_page.dart +++ b/lib/ui/home/set/specify_phone_page.dart @@ -6,14 +6,13 @@ import 'package:project_telephony/model/network/api_client.dart'; import 'package:project_telephony/ui/exclude/exclude_contacts_page.dart'; import 'package:project_telephony/ui/exclude/exclude_single_page.dart'; import 'package:project_telephony/ui/home/set/phone_num_list/call_records_list.dart'; -import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart'; +import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/toast/cloud_toast.dart'; import 'package:project_telephony/utils/user_tool.dart'; -import '../../../base/base_style.dart'; +import '../../../base/base_style.dart'; import '../../../model/exclude_phone_model.dart'; - import '../../widget/scaffold_theme_widget.dart'; import 'func/exclude_contacts_func.dart'; diff --git a/lib/ui/loading.dart b/lib/ui/loading.dart index 030e2c4..5d4e44a 100644 --- a/lib/ui/loading.dart +++ b/lib/ui/loading.dart @@ -1,7 +1,8 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:project_telephony/ui/tab_navigator.dart'; -import 'dart:async'; import 'package:project_telephony/utils/headers.dart'; import 'package:provider/provider.dart'; diff --git a/lib/ui/login/login_page.dart b/lib/ui/login/login_page.dart index e5258cd..16ec20b 100644 --- a/lib/ui/login/login_page.dart +++ b/lib/ui/login/login_page.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; @@ -9,6 +10,7 @@ import 'package:project_telephony/ui/login/login_psd_page.dart'; import 'package:project_telephony/ui/user/set_password_page.dart'; import 'package:project_telephony/ui/widget/plone_back_button.dart'; import 'package:project_telephony/utils/headers.dart'; + import '../../base/base_style.dart'; import '../../constants/api.dart'; import '../../constants/environment/environment.dart'; @@ -75,7 +77,6 @@ class _LoginPageState extends State { @override Widget build(BuildContext context) { - return CloudScaffold( systemStyle: const SystemUiOverlayStyle( statusBarIconBrightness: Brightness.dark, @@ -124,7 +125,7 @@ class _LoginPageState extends State { const Spacer(), TextButton( onPressed: () { - Get.to(()=>const LoginPsdPage()); + Get.to(() => const LoginPsdPage()); }, child: const Text( '密码登录', @@ -155,17 +156,25 @@ class _LoginPageState extends State { // BotToast.showText(text: "过快"); return; } + _lastTap = DateTime.now(); + var base = await apiClient.request(API.app.login, data: { 'phone': _phoneController.text, 'code': _smsCodeController.text }); + if (base.code == 0) { - await UserTool.userProvider.setToken(base.data['token']); - Get.offAll(const TabNavigator()); - if (UserTool.userProvider.userInfo.havePwd == 0) { - Get.to(()=>const SetPasswordPage()); - } + print("1"); + await UserTool.userProvider.setToken(base.data['token']); + print("2"); + Get.offAll(const TabNavigator()); + print("3"); + if (UserTool.userProvider.userInfo.havePwd == 0) { + Get.to(() => const SetPasswordPage()); + } + + } else { CloudToast.show(base.msg); } diff --git a/lib/ui/login/login_psd_page.dart b/lib/ui/login/login_psd_page.dart index ab21946..c432741 100644 --- a/lib/ui/login/login_psd_page.dart +++ b/lib/ui/login/login_psd_page.dart @@ -136,8 +136,11 @@ class _LoginPsdPageState extends State { 'password': _pwdController.text }); if (base.code == 0) { + print("1"); await UserTool.userProvider.setToken(base.data['token']); + print("2"); Get.offAll(const TabNavigator()); + print("3"); } else { CloudToast.show(base.msg); diff --git a/lib/ui/tab_navigator.dart b/lib/ui/tab_navigator.dart index 1daba06..dd5a092 100644 --- a/lib/ui/tab_navigator.dart +++ b/lib/ui/tab_navigator.dart @@ -2,6 +2,7 @@ import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:project_telephony/ui/user/user_page.dart'; import 'package:project_telephony/utils/headers.dart'; + import 'TextMe/text_me_page.dart'; import 'home/home_page.dart'; @@ -31,7 +32,7 @@ class _TabNavigatorState extends State // await HiveStore.init(); // }); // , const TextMePage() - _pages = [const HomePage() , const TextMePage(),const UserPage()]; + _pages = [const HomePage(),const UserPage()]; _tabController = TabController( length: _pages.length, vsync: this, initialIndex: widget.index ?? 0); } @@ -59,8 +60,8 @@ class _TabNavigatorState extends State List _bottomNav = [ _buildBottomBar("首页", Assets.icons.homeNoSelected.path, Assets.icons.homeSelected.path), - _buildBottomBar("群发", Assets.icons.nomass.path, - Assets.icons.mass.path), + // _buildBottomBar("群发", Assets.icons.nomass.path, + // Assets.icons.mass.path), _buildBottomBar( "我的", Assets.icons.myNoselected.path, Assets.icons.mySelected.path) ]; diff --git a/lib/ui/user/content_authority_page.dart b/lib/ui/user/content_authority_page.dart index 98ed967..711e1ff 100644 --- a/lib/ui/user/content_authority_page.dart +++ b/lib/ui/user/content_authority_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; + import '../../base/base_style.dart'; import '../widget/plone_back_button.dart'; diff --git a/lib/ui/user/content_details_page.dart b/lib/ui/user/content_details_page.dart index 03895d5..adc7f88 100644 --- a/lib/ui/user/content_details_page.dart +++ b/lib/ui/user/content_details_page.dart @@ -2,12 +2,10 @@ import 'package:flutter/material.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/user_tool.dart'; - import '../../base/base_style.dart'; import '../../constants/api.dart'; import '../../model/network/api_client.dart'; import '../../model/network/base_model.dart'; - import '../../utils/toast/cloud_toast.dart'; import '../widget/plone_back_button.dart'; import '../widget/plone_bottom.dart'; diff --git a/lib/ui/user/members_page.dart b/lib/ui/user/members_page.dart index f9301ea..a8e2a1e 100644 --- a/lib/ui/user/members_page.dart +++ b/lib/ui/user/members_page.dart @@ -4,9 +4,8 @@ import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:fluwx/fluwx.dart' as fluwx; import 'package:project_telephony/base/base_style.dart'; - - import 'package:project_telephony/ui/widget/check_radio.dart'; import 'package:project_telephony/ui/widget/plone_back_button.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart'; @@ -14,7 +13,6 @@ import 'package:project_telephony/ui/widget/putup_widget.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/user_tool.dart'; import 'package:tobias/tobias.dart'; -import 'package:fluwx/fluwx.dart' as fluwx; import '../../constants/api.dart'; import '../../model/network/api_client.dart'; diff --git a/lib/ui/user/privacy_rights_page.dart b/lib/ui/user/privacy_rights_page.dart index 6cfd142..62bb2ad 100644 --- a/lib/ui/user/privacy_rights_page.dart +++ b/lib/ui/user/privacy_rights_page.dart @@ -1,8 +1,6 @@ import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; - import 'package:project_telephony/base/base_style.dart'; - import 'package:project_telephony/ui/widget/plone_back_button.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/lib/ui/user/user_page.dart b/lib/ui/user/user_page.dart index 12698a9..50f792e 100644 --- a/lib/ui/user/user_page.dart +++ b/lib/ui/user/user_page.dart @@ -12,7 +12,6 @@ import 'package:project_telephony/ui/tab_navigator.dart'; import 'package:project_telephony/ui/user/content_authority_page.dart'; import 'package:project_telephony/ui/user/members_page.dart'; import 'package:project_telephony/ui/user/privacy_rights_page.dart'; -import 'package:project_telephony/ui/user/set_password_page.dart'; import 'package:project_telephony/ui/user/setting_page.dart'; import 'package:project_telephony/ui/user/user_card_page.dart'; import 'package:project_telephony/ui/widget/image_scaffold.dart'; @@ -21,15 +20,14 @@ import 'package:project_telephony/utils/headers.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:telephony/telephony.dart'; + import '../../constants/api.dart'; import '../../model/network/api_client.dart'; import '../../providers/user_provider.dart'; - import '../../utils/toast/cloud_toast.dart'; import '../../utils/user_tool.dart'; import '../home/call.dart'; import '../widget/appdialog.dart'; - import 'content_details_page.dart'; class UserPage extends StatefulWidget { @@ -310,7 +308,8 @@ class _UserPageState extends State { if (UserTool.userProvider.userInfo.isVip != 1) { isVip = false; vle = false; - // _easyRefreshController.callRefresh(); + // UserTool.userProvider.updateUserInfo(); + _easyRefreshController.callRefresh(); } else { isVip = true; vle = await service.isRunning(); diff --git a/lib/ui/widget/appdialog.dart b/lib/ui/widget/appdialog.dart index 9b0729d..d57b81a 100644 --- a/lib/ui/widget/appdialog.dart +++ b/lib/ui/widget/appdialog.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; - import 'package:project_telephony/utils/headers.dart'; + import '../../constants/api.dart'; import '../../model/network/api_client.dart'; import '../../utils/toast/cloud_toast.dart'; diff --git a/lib/ui/widget/centertipsalterwidget.dart b/lib/ui/widget/centertipsalterwidget.dart index a36732f..e302b28 100644 --- a/lib/ui/widget/centertipsalterwidget.dart +++ b/lib/ui/widget/centertipsalterwidget.dart @@ -1,5 +1,4 @@ import 'package:flutter/cupertino.dart'; - import 'package:project_telephony/utils/headers.dart'; import 'package:provider/provider.dart'; diff --git a/lib/ui/widget/plone_image_picker.dart b/lib/ui/widget/plone_image_picker.dart index ad108c8..e1825a8 100644 --- a/lib/ui/widget/plone_image_picker.dart +++ b/lib/ui/widget/plone_image_picker.dart @@ -2,7 +2,6 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:image_picker/image_picker.dart'; - // import 'package:image_picker/image_picker.dart'; import 'package:project_telephony/utils/headers.dart'; import 'package:velocity_x/velocity_x.dart'; diff --git a/lib/ui/widget/scaffold_theme_widget.dart b/lib/ui/widget/scaffold_theme_widget.dart index 649fb51..2921fd4 100644 --- a/lib/ui/widget/scaffold_theme_widget.dart +++ b/lib/ui/widget/scaffold_theme_widget.dart @@ -1,10 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; -import 'package:project_telephony/model/sms_content_model.dart'; -import 'package:project_telephony/utils/user_tool.dart'; -import 'package:provider/provider.dart'; -import 'package:velocity_x/velocity_x.dart'; import '../../base/base_style.dart'; import '../widget/plone_back_button.dart'; diff --git a/lib/utils/headers.dart b/lib/utils/headers.dart index 20e13af..8968710 100644 --- a/lib/utils/headers.dart +++ b/lib/utils/headers.dart @@ -1,7 +1,7 @@ // export 'package:cloud_car/base/base_style.dart'; +export 'package:flutter_screenutil/flutter_screenutil.dart'; +export 'package:get/get.dart'; export 'package:project_telephony/extensions/num_ext.dart'; export 'package:project_telephony/extensions/num_ext.dart'; export 'package:project_telephony/extensions/wigget_list_ext.dart'; export 'package:project_telephony/gen/assets.gen.dart'; -export 'package:flutter_screenutil/flutter_screenutil.dart'; -export 'package:get/get.dart'; diff --git a/lib/utils/user_tool.dart b/lib/utils/user_tool.dart index 1d5d233..dcaf6bf 100644 --- a/lib/utils/user_tool.dart +++ b/lib/utils/user_tool.dart @@ -1,5 +1,6 @@ // import 'package:project_telephony/providers/phone_provider.dart'; import 'package:provider/provider.dart'; + import '../providers/phone_num_provider.dart'; import '../providers/user_provider.dart'; import 'headers.dart';