setSelfInfo static method
Future<V2TimCallback>
setSelfInfo(
{ - required V2TimUserFullInfo userFullInfo,
})
Implementation
static Future<V2TimCallback> setSelfInfo({
required V2TimUserFullInfo userFullInfo,
}) async {
String userData = Tools.generateUserData();
Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);
Map<String, dynamic> mapParam = Tools.generateNativeUserInfoByDartParam(userFullInfo);
Pointer<Uint8> json_modify_self_user_profile_param = Tools.string2PointerInt8(json.encode(Tools.rmJsonNullValue(mapParam)));
int res = desktopSDK.D_TIMProfileModifySelfUserProfile(json_modify_self_user_profile_param, user_data);
if (res != TIMResult.TIM_SUCC) {
return V2TimCallback.fromJson({
"code": res,
"desc": "",
});
} else {
Map<String, dynamic> data = await getAsyncData(apiKey: userData);
return V2TimCallback.fromJson({
"code": data["code"],
"desc": data["desc"],
});
}
}