updateUserInfo method
Update user info.The frequency of api usage for free users is 100 times in 1 second.Upgrading the package can increase the usage.
- Parameters:
- userInfo: UserInfoProtocol
- completion:
Implementation
@override
Future<void> updateUserInfo({UserInfoProtocol? user}) async {
if (user == null) return;
String? identifyMap;
if (user.identify?.isNotEmpty == true) {
identifyMap = json.encode({'identify': user.identify});
}
await Client.getInstance.userInfoManager.updateUserInfo(
nickname: user.nickname,
avatarUrl: user.avatarURL,
gender: user.gender,
ext: identifyMap,
);
ChatroomContext.instance.updateUserInfos([user]);
}