getUserProfile method
Implementation
@override
Future<List<Map<String, dynamic>>> getUserProfile(List<String> userIdList) async {
if (ImState.chatInstance.value != null) {
V2TimValueCallback<List<V2TimUserFullInfo>> userFullInfoList = await TencentImSDKPlugin.v2TIMManager.getUsersInfo(userIDList: userIdList);
if (userFullInfoList.code == 0) {
developerLog('🎉🎉🎉 已成功返回要查询的其他用户信息 > ${userIdList.join('、')}');
return userFullInfoList.data!.map((item) => item.toJson()).toList();
} else {
developerLog('获取其他用户信息异常,${userFullInfoList.code} | ${userFullInfoList.desc}');
throw Exception('获取其他用户信息异常,${userFullInfoList.code} | ${userFullInfoList.desc}');
}
} else {
developerLog('sdk 未初始化');
throw Exception('sdk 未初始化');
}
}