updateOwnUserInfo method Null safety

Future<void> updateOwnUserInfo(
  1. EMUserInfo userInfo
)

Modifies the user attributes of the current user.

Param userInfo The user attributes to be modified.

Throws A description of the exception. See {@link EMError}.

Implementation

Future<void> updateOwnUserInfo(EMUserInfo userInfo) async {
  Map req = {'userInfo': userInfo.toJson()};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.updateOwnUserInfo, req);
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}