From 0cf542d65c5adc316c8a13a164e1251c1f914f44 Mon Sep 17 00:00:00 2001 From: datang Date: Tue, 30 Aug 2022 17:08:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A0=8F=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/home/call.dart | 2 +- pubspec.lock | 16 ++++++++++------ pubspec.yaml | 8 ++++++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/ui/home/call.dart b/lib/ui/home/call.dart index 16df61b..5e17a0b 100644 --- a/lib/ui/home/call.dart +++ b/lib/ui/home/call.dart @@ -5,6 +5,7 @@ import 'package:call_log/call_log.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_background_service/flutter_background_service.dart'; +import 'package:flutter_background_service_android/flutter_background_service_android.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:telephony/telephony.dart'; @@ -40,7 +41,6 @@ bool onIosBackground(ServiceInstance service) { } void onStart(ServiceInstance service) async { - DartPluginRegistrant.ensureInitialized(); int flag = 0; String? phoneNum = ""; int? callRecords = 0; diff --git a/pubspec.lock b/pubspec.lock index ef32a10..6119083 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -331,16 +331,20 @@ packages: flutter_background_service: dependency: "direct main" description: - name: flutter_background_service - url: "https://pub.dartlang.org" - source: hosted + path: "." + ref: HEAD + resolved-ref: ee40fe3df73119bc7064e34d36fc7d8a0194e651 + url: "https://git.oa00.com/austin_dai/flutter_background_service.git" + source: git version: "2.1.3" flutter_background_service_android: dependency: "direct main" description: - name: flutter_background_service_android - url: "https://pub.dartlang.org" - source: hosted + path: "." + ref: HEAD + resolved-ref: "63a2277119558ed55de1098b5c05040ef9ff845d" + url: "https://git.oa00.com/austin_dai/flutter_background_service_android.git" + source: git version: "2.0.3" flutter_background_service_ios: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index ac52680..90de2fd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -44,8 +44,12 @@ dependencies: git: url: https://git.oa00.com/austin_dai/permission_handler.git # 后台设置 - flutter_background_service: ^2.1.3 - flutter_background_service_android: ^2.0.3 + flutter_background_service: + git: + url: https://git.oa00.com/austin_dai/flutter_background_service.git + flutter_background_service_android: + git: + url: https://git.oa00.com/austin_dai/flutter_background_service_android.git device_info_plus: any # 屏幕适配 flutter_screenutil: ^5.5.3+2