File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ Future<void> main() async {
2020 options: DefaultFirebaseOptions .currentPlatform,
2121 );
2222
23- AppFCM .init ();
23+ await AppFCM .init ();
24+
25+ print ("object" );
2426
2527 App .showAds = Utils .isMobile ();
2628 if (App .showAds) {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ part 'models.dart';
1414class AppFCM {
1515 static final ins = FirebaseMessaging .instance;
1616
17- static void init () async {
17+ static Future < void > init () async {
1818 LocalNotification .init ();
1919 // FirebaseMessaging.onBackgroundMessage(_onBackgroundMessageHandler);
2020 if (Platform .isIOS) {
Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
2+ import 'package:flutter/services.dart' ;
23
34import 'package:flutter_uis/Providers/AppProvider.dart' ;
45
56import 'package:flutter_uis/configs/AppDimensions.dart' ;
67import 'package:flutter_uis/configs/TextStyles.dart' ;
78import 'package:flutter_uis/configs/App.dart' ;
9+ import 'package:flutter_uis/services/notification/notification.dart' ;
810
911import 'ScreenSettingsSelect.dart' ;
1012import 'data.dart' ;
@@ -145,7 +147,14 @@ class ScreenSettingsModalBody extends StatelessWidget {
145147 ),
146148 ),
147149 ScreenSettingsSelect (
148- onPress: () => {},
150+ onPress: () async {
151+ final token = await AppFCM .getToken ();
152+ if (token == null ) {
153+ return ;
154+ }
155+ print (token);
156+ Clipboard .setData (ClipboardData (text: token));
157+ },
149158 isActive: false ,
150159 text: "Copy fcm token to clipboard" ,
151160 ),
You can’t perform that action at this time.
0 commit comments