updatePushNickname method Null safety
- String nickname
Updates the push display nickname of the current user.
This method can be used to set a push display nickname, the push display nickname will be used to show for offline push notification. When the app user changes the nickname in the user profile(use {@link ChatUserInfoManager#updateOwnInfo(ChatUserInfo, int?) be sure to also call this method to update to prevent the display differences.
Param nickname The push display nickname, which is different from the nickname in the user profile.
Throws A description of the issue that caused this exception. See {@link ChatError}
Implementation
Future<void> updatePushNickname(String nickname) async {
Map req = {'nickname': nickname};
Map result =
await _channel.invokeMethod(ChatMethodKeys.updatePushNickname, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}