updateOwnUserInfoWithType method Null safety
- EMUserInfoType type,
- String userInfoValue
更新自己用户属性
Implementation
Future<EMUserInfo?> updateOwnUserInfoWithType(
EMUserInfoType type, String userInfoValue) async {
Map req = {
'userInfoType': _userInfoTypeToInt(type),
'userInfoValue': userInfoValue
};
Map result =
await _channel.invokeMethod(EMSDKMethod.updateOwnUserInfoWithType, req);
EMError.hasErrorFromResult(result);
if (result[EMSDKMethod.updateOwnUserInfoWithType] != null) {
_ownUserInfo =
EMUserInfo.fromJson(result[EMSDKMethod.updateOwnUserInfoWithType]);
_effectiveUserInfoMap[_ownUserInfo!.userId] = _ownUserInfo!;
}
return _ownUserInfo;
}