updateFCMPushToken method Null safety
- String token
Updates the FCM push token.
Param token The FCM push token.
Throws A description of the issue that caused this exception. See {@link ChatError}
Implementation
Future<void> updateFCMPushToken(String token) async {
if (Platform.isAndroid) {
Map req = {'token': token};
Map result =
await _channel.invokeMethod(ChatMethodKeys.updateFCMPushToken, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}
}