unregisterPushDevice method
- PushDeviceToken token
Unregisters a device (Android, iOS, or Web) from receiving notifications via Firebase Cloud Messaging.
Authentication
Mandatory.
Result
Always returns true on success.
Idempotent
Succeeds if the specified token is not registered already.
Implementation
Future<void> unregisterPushDevice(PushDeviceToken token) async {
Log.debug('unregisterPushDevice($token)', '$runtimeType');
final variables = UnregisterPushDeviceArguments(token: token);
await client.mutate(
MutationOptions(
operationName: 'UnregisterPushDevice',
document: UnregisterPushDeviceMutation(variables: variables).document,
variables: variables.toJson(),
),
);
}