bindDeviceToken method
bind the push token.
Param token The push token.
Throws A description of the issue that caused this exception. See ChatError
Implementation
Future<void> bindDeviceToken(
{required String notifierName, required String deviceToken}) async {
try {
Map req = {'notifierName': notifierName, 'deviceToken': deviceToken};
Map result = await platform_interface.Client.instance.pushManager
.callNativeMethod(ChatMethodKeys.bindDeviceToken, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}