updatePushNickname method

Future<void> updatePushNickname(
  1. 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 ChatUserInfoManager.updateUserInfo 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 ChatError


Future<void> updatePushNickname(String nickname) async {
  Map req = {'nickname': nickname};
  Map result =
      await PushChannel.invokeMethod(ChatMethodKeys.updatePushNickname, req);
  try {
  } on ChatError catch (e) {
    throw e;