|
|
|
|
@ -122,7 +122,7 @@ class BackgroundPush {
|
|
|
|
|
//<GOOGLE_SERVICES>firebase.setListeners(
|
|
|
|
|
//<GOOGLE_SERVICES> onMessage: (message) => pushHelper(
|
|
|
|
|
//<GOOGLE_SERVICES> PushNotification.fromJson(
|
|
|
|
|
//<GOOGLE_SERVICES> Map<String, dynamic>.from(message['data'] ?? message),
|
|
|
|
|
//<GOOGLE_SERVICES> message.tryGetMap<String, Object>('data') ?? message,
|
|
|
|
|
//<GOOGLE_SERVICES> ),
|
|
|
|
|
//<GOOGLE_SERVICES> client: client,
|
|
|
|
|
//<GOOGLE_SERVICES> l10n: l10n,
|
|
|
|
|
@ -351,6 +351,9 @@ class BackgroundPush {
|
|
|
|
|
Future<void> setupFirebase() async {
|
|
|
|
|
Logs().v('Setup firebase');
|
|
|
|
|
if (_fcmToken?.isEmpty ?? true) {
|
|
|
|
|
if (PlatformInfos.isIOS) {
|
|
|
|
|
//<GOOGLE_SERVICES>await firebase.requestPermission();
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
//<GOOGLE_SERVICES>_fcmToken = await firebase.getToken();
|
|
|
|
|
if (_fcmToken == null) throw ('PushToken is null');
|
|
|
|
|
|