copyWith method Null safety
Sets user attributes.
Return The new user information instance.
Implementation
EMUserInfo copyWith({
/// Param [nickName] The user's nickname.
String? nickName,
/// Param [avatarUrl] The avatar URL of the user.
String? avatarUrl,
/// Param [mail] The email address of the user.
String? mail,
/// Param [phone] The phone number of the user.
String? phone,
/// Param [gender] The user's gender. The value can only be `0`, `1`, or `2`. Other values are invalid.
/// - `0`: (Default) Unknow;
/// - `1`: Male;
/// - `2`: Female.
int? gender,
/// Param [sign] The user's signature.
String? sign,
/// Param [birth] The user's data of birth.
String? birth,
/// Param [ext] The user's extension information. You can set it to an empty string or type custom information and encapsulate them as a JSON string.
String? ext,
}) {
return EMUserInfo._private(
userId: this.userId,
nickName: nickName ?? this.nickName,
avatarUrl: avatarUrl ?? this.avatarUrl,
mail: mail ?? this.mail,
phone: phone ?? this.phone,
gender: gender ?? this.gender,
sign: sign ?? this.sign,
birth: birth ?? this.birth,
ext: ext ?? this.birth,
);
}