setSelfStatus static method
Future<V2TimCallback>
setSelfStatus(
{ - required String status,
})
Implementation
static Future<V2TimCallback> setSelfStatus({
required String status,
}) async {
String userData = Tools.generateUserData();
Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);
Pointer<Uint8> json_current_user_status = Tools.string2PointerInt8(json.encode({
"user_status_custom_status": status,
}));
int res = desktopSDK.D_TIMSetSelfStatus(json_current_user_status, 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": res,
"desc": "",
});
}
}