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