diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d1a8d3b..882a27b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -31,6 +31,8 @@ android:name="flutterEmbedding" android:value="2" /> + + diff --git a/lib/main.dart b/lib/main.dart index 7e164d6..d51cf68 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -109,19 +109,19 @@ class _MyAppState extends State { // production: false, // debug: true // ); - service.start(); - List permissions = [ - Permission.sms, - Permission.phone, - ]; - PermissionHelper.check(permissions, onSuccess: () { - print('onSuccess'); - }, onFailed: () { - print('onFailed'); - }, onOpenSetting: () { - print('onOpenSetting'); - openAppSettings(); - }); + // service.start(); + // List permissions = [ + // Permission.sms, + // Permission.phone, + // ]; + // PermissionHelper.check(permissions, onSuccess: () { + // print('onSuccess'); + // }, onFailed: () { + // print('onFailed'); + // }, onOpenSetting: () { + // print('onOpenSetting'); + // openAppSettings(); + // }); } // onMessage(SmsMessage message) async { diff --git a/lib/ui/user/privacy_rights_page.dart b/lib/ui/user/privacy_rights_page.dart index 8c1d10e..f6a2924 100644 --- a/lib/ui/user/privacy_rights_page.dart +++ b/lib/ui/user/privacy_rights_page.dart @@ -1,5 +1,3 @@ -import 'dart:math'; - import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:project_telephony/base/base_style.dart'; @@ -63,7 +61,7 @@ class _PrivacyRightsPageState extends State { ? null : Column( children: [ - _getRights(pd), + _getRights(pd!), ], )); } diff --git a/lib/ui/user/user_page.dart b/lib/ui/user/user_page.dart index 9a8c29f..70203dc 100644 --- a/lib/ui/user/user_page.dart +++ b/lib/ui/user/user_page.dart @@ -2,8 +2,8 @@ import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart'; import 'package:project_telephony/base/base_style.dart'; -import 'package:project_telephony/ui/home/home_page.dart'; import 'package:project_telephony/ui/login/login_page.dart'; import 'package:project_telephony/ui/user/members_page.dart'; import 'package:project_telephony/ui/user/privacy_rights_page.dart'; @@ -31,6 +31,7 @@ void initState() {} class _UserPageState extends State { bool vle = false; bool tooken = true; + @override Widget build(BuildContext context) { return CloudScaffold( @@ -54,7 +55,8 @@ class _UserPageState extends State { PloneBottom( border: false, onTap: () { - // PermissionUtils.requestAllPermission(); + PermissionUtils.requestAllPermission(); + // Get.to(() => const HomePage()); }, textColor: const Color(0xFF1890FF), diff --git a/pubspec.lock b/pubspec.lock index 4fcc61e..ae5c11a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -320,28 +320,7 @@ packages: name: flutter_background_service url: "https://pub.dartlang.org" source: hosted - version: "0.2.8+5" - flutter_background_service_android: - dependency: transitive - description: - name: flutter_background_service_android - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.2" - flutter_background_service_ios: - dependency: transitive - description: - name: flutter_background_service_ios - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.2" - flutter_background_service_platform_interface: - dependency: transitive - description: - name: flutter_background_service_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+3" + version: "0.2.6" flutter_gen_core: dependency: transitive description: @@ -369,7 +348,7 @@ packages: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "1.3.3" + version: "1.3.2" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -435,7 +414,7 @@ packages: name: grinder url: "https://pub.dartlang.org" source: hosted - version: "0.9.2" + version: "0.9.1" hive: dependency: "direct main" description: @@ -631,7 +610,7 @@ packages: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.17" + version: "2.0.12" path_provider_ios: dependency: transitive description: @@ -689,7 +668,7 @@ packages: source: hosted version: "9.0.4" permission_handler_platform_interface: - dependency: transitive + dependency: "direct main" description: name: permission_handler_platform_interface url: "https://pub.dartlang.org" @@ -820,7 +799,7 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.2.0" shelf_web_socket: dependency: transitive description: @@ -896,6 +875,16 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.0+2" +<<<<<<< HEAD +======= + telephony: + dependency: "direct main" + description: + name: telephony + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" +>>>>>>> b3fc551780d9788cb9ec28a234cb871209f9f7ce term_glyph: dependency: transitive description: @@ -1010,4 +999,8 @@ packages: version: "3.1.1" sdks: dart: ">=2.17.0-0 <3.0.0" +<<<<<<< HEAD flutter: ">=2.8.1" +======= + flutter: ">=2.8.0" +>>>>>>> b3fc551780d9788cb9ec28a234cb871209f9f7ce diff --git a/pubspec.yaml b/pubspec.yaml index 49b8f7a..a7bc943 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,7 +34,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 -# telephony: any + telephony: ^0.2.0 ## 获取来电状态 # provider: ^6.0.3 # 获取通话记录 @@ -68,6 +68,8 @@ dependencies: flustars: ^2.0.1 # model生成 json_annotation: ^4.6.0 + permission_handler_platform_interface: ^3.7.0 + # # jdk # jverify: ^2.2.5 ## pub 集成