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