File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1522,9 +1522,7 @@ class UpdateMachine {
15221522 }
15231523
15241524 Future <void > _registerNotificationToken () async {
1525- final token = NotificationService .instance.token.value;
1526- if (token == null ) return ;
1527- await NotificationService .registerToken (store.connection, token: token);
1525+ await NotificationService .instance.registerToken (store.connection);
15281526 }
15291527
15301528 /// Cleans up resources and tells the instance not to make new API requests.
Original file line number Diff line number Diff line change @@ -147,7 +147,10 @@ class NotificationService {
147147 token.value = value;
148148 }
149149
150- static Future <void > registerToken (ApiConnection connection, {required String token}) async {
150+ Future <void > registerToken (ApiConnection connection) async {
151+ final token = this .token.value;
152+ if (token == null ) return ;
153+
151154 switch (defaultTargetPlatform) {
152155 case TargetPlatform .android:
153156 await addFcmToken (connection, token: token);
You can’t perform that action at this time.
0 commit comments