File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
examples/push_notifications/lib Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Future<void> main() async {
99 options: DefaultFirebaseOptions .currentPlatform,
1010 );
1111
12- await registerPushNotificationHandlers (
12+ await Talk . registerPushNotificationHandlers (
1313 androidChannel: const AndroidChannel (
1414 channelId: 'com.talkjs.flutter_push_example.messages' ,
1515 channelName: 'Messages' ,
Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ class Talk {
3232 final hash = digest.toString ().toLowerCase ();
3333 return hash.substring (0 , 20 );
3434 }
35- }
3635
37- Future <void > registerPushNotificationHandlers ({AndroidChannel ? androidChannel, IOSPermissions ? iosPermissions}) async {
38- if ((Platform .isAndroid) && (androidChannel != null )) {
39- await registerAndroidPushNotificationHandlers (androidChannel);
40- }
36+ static Future <void > registerPushNotificationHandlers ({AndroidChannel ? androidChannel, IOSPermissions ? iosPermissions}) async {
37+ if ((Platform .isAndroid) && (androidChannel != null )) {
38+ await registerAndroidPushNotificationHandlers (androidChannel);
39+ }
4140
42- if ((Platform .isIOS) && (iosPermissions != null )) {
43- await registerIOSPushNotificationHandlers (iosPermissions);
41+ if ((Platform .isIOS) && (iosPermissions != null )) {
42+ await registerIOSPushNotificationHandlers (iosPermissions);
43+ }
4444 }
4545}
You can’t perform that action at this time.
0 commit comments