fix: rm gms (#379 #381)

This commit is contained in:
lollipopkit
2024-06-11 16:40:05 +08:00
parent 131dbe934c
commit f3ceb73f0e
3 changed files with 14 additions and 15 deletions

View File

@@ -2,14 +2,9 @@ import 'package:fl_lib/fl_lib.dart';
import 'package:plain_notification_token/plain_notification_token.dart';
Future<String?> getToken() async {
if (isIOS) {
final plainNotificationToken = PlainNotificationToken();
plainNotificationToken.requestPermission();
// If you want to wait until Permission dialog close,
// you need wait changing setting registered.
await plainNotificationToken.onIosSettingsRegistered.first;
return await plainNotificationToken.getToken();
}
return null;
if (!isIOS) return null;
final instance = ApnsToken()..requestPermission();
// Wait until Permission dialog closed
await instance.onIosSettingsRegistered.first;
return await instance.getToken();
}

View File

@@ -989,10 +989,11 @@ packages:
plain_notification_token:
dependency: "direct main"
description:
name: plain_notification_token
sha256: "32481c1c6ad76613ed38822ffe819ea5d5534f9e07e8ff1d44aafe069f45ea24"
url: "https://pub.dev"
source: hosted
path: "."
ref: master
resolved-ref: "5f56dc56a6670e2533b0caa7d09d31d16e6c7663"
url: "https://github.com/lollipopkit/plain_notification_token"
source: git
version: "0.0.4"
platform:
dependency: transitive

View File

@@ -17,7 +17,6 @@ dependencies:
after_layout: ^1.1.0
easy_isolate: ^1.3.0
intl: ^0.19.0
plain_notification_token: ^0.0.4
highlight: ^0.7.0
flutter_highlight: ^0.7.0
code_text_field: ^1.1.0
@@ -50,6 +49,10 @@ dependencies:
git:
url: https://github.com/lollipopkit/dart_computer
ref: master
plain_notification_token:
git:
url: https://github.com/lollipopkit/plain_notification_token
ref: master
fl_lib:
git:
url: https://github.com/lppcg/fl_lib