We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d647114 commit 6a6f145Copy full SHA for 6a6f145
lib/notifications/receive.dart
@@ -159,6 +159,22 @@ class NotificationService {
159
}
160
161
162
+ static Future<void> unregisterToken(ApiConnection connection, {required String token}) async {
163
+ switch (defaultTargetPlatform) {
164
+ case TargetPlatform.android:
165
+ await removeFcmToken(connection, token: token);
166
+
167
+ case TargetPlatform.iOS:
168
+ await removeApnsToken(connection, token: token);
169
170
+ case TargetPlatform.linux:
171
+ case TargetPlatform.macOS:
172
+ case TargetPlatform.windows:
173
+ case TargetPlatform.fuchsia:
174
+ assert(false);
175
+ }
176
177
178
static void _onForegroundMessage(FirebaseRemoteMessage message) {
179
assert(debugLog("notif message: ${message.data}"));
180
_onRemoteMessage(message);
0 commit comments