[Update] Add user online status change callback.

main 3.2.0
std-s 2 years ago
parent 642cc61a2e
commit a9f2e267cf
  1. 2
      lib/flutter_openim_sdk.dart
  2. 5
      lib/src/listener/user_listener.dart
  3. 88
      lib/src/manager/im_manager.dart
  4. 381
      lib/src/models/organization_info.dart
  5. 245
      lib/src/models/signaling_info.dart
  6. 31
      lib/src/models/user_info.dart

@ -33,9 +33,7 @@ export 'src/models/group_info.dart';
export 'src/models/meeting_info.dart';
export 'src/models/message.dart';
export 'src/models/notification_info.dart';
export 'src/models/organization_info.dart';
export 'src/models/search_info.dart';
export 'src/models/signaling_info.dart';
export 'src/models/user_info.dart';
export 'src/openim.dart';
export 'src/utils.dart';

@ -4,6 +4,7 @@ import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class OnUserListener {
/// The information of the logged-in user has been updated
Function(UserInfo info)? onSelfInfoUpdated;
Function(UserStatusInfo info)? onUserStatusChanged;
OnUserListener({this.onSelfInfoUpdated});
@ -11,4 +12,8 @@ class OnUserListener {
void selfInfoUpdated(UserInfo info) {
onSelfInfoUpdated?.call(info);
}
void userStatusChanged(UserStatusInfo info) {
onUserStatusChanged?.call(info);
}
}

@ -63,29 +63,29 @@ class IMManager {
userInfo = Utils.toObj(data, (map) => UserInfo.fromJson(map));
userManager.listener.selfInfoUpdated(userInfo);
break;
case 'onUserStatusChanged':
final status = Utils.toObj(data, (map) => UserStatusInfo.fromJson(map));
userManager.listener.userStatusChanged(status);
break;
}
} else if (call.method == ListenerType.groupListener) {
String type = call.arguments['type'];
dynamic data = call.arguments['data'];
switch (type) {
case 'onGroupApplicationAccepted':
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.listener.groupApplicationAccepted(i);
break;
case 'onGroupApplicationAdded':
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.listener.groupApplicationAdded(i);
break;
case 'onGroupApplicationDeleted':
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.listener.groupApplicationDeleted(i);
break;
case 'onGroupApplicationRejected':
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
groupManager.listener.groupApplicationRejected(i);
break;
case 'onGroupDismissed':
@ -97,18 +97,15 @@ class IMManager {
groupManager.listener.groupInfoChanged(i);
break;
case 'onGroupMemberAdded':
final i =
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
groupManager.listener.groupMemberAdded(i);
break;
case 'onGroupMemberDeleted':
final i =
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
groupManager.listener.groupMemberDeleted(i);
break;
case 'onGroupMemberInfoChanged':
final i =
Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupMembersInfo.fromJson(map));
groupManager.listener.groupMemberInfoChanged(i);
break;
case 'onJoinedGroupAdded':
@ -136,36 +133,31 @@ class IMManager {
break;
case 'onRecvC2CReadReceipt':
var value = call.arguments['data']['msgReceiptList'];
var list =
Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
var list = Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
messageManager.msgListener.recvC2CReadReceipt(list);
break;
case 'onRecvGroupReadReceipt':
var value = call.arguments['data']['groupMsgReceiptList'];
var list =
Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
var list = Utils.toList(value, (map) => ReadReceiptInfo.fromJson(map));
messageManager.msgListener.recvGroupReadReceipt(list);
break;
case 'onRecvMessageExtensionsAdded':
var msgID = call.arguments['data']['msgID'];
var value = call.arguments['data']['reactionExtensionList'];
var list = Utils.toList(value, (map) => KeyValue.fromJson(map));
messageManager.msgListener
.recvMessageExtensionsAdded(msgID, list);
messageManager.msgListener.recvMessageExtensionsAdded(msgID, list);
break;
case 'onRecvMessageExtensionsChanged':
var msgID = call.arguments['data']['msgID'];
var value = call.arguments['data']['reactionExtensionList'];
var list = Utils.toList(value, (map) => KeyValue.fromJson(map));
messageManager.msgListener
.recvMessageExtensionsChanged(msgID, list);
messageManager.msgListener.recvMessageExtensionsChanged(msgID, list);
break;
case 'onRecvMessageExtensionsDeleted':
var msgID = call.arguments['data']['msgID'];
var value = call.arguments['data']['reactionExtensionKeyList'];
var list = Utils.toList(value, (map) => '$map');
messageManager.msgListener
.recvMessageExtensionsDeleted(msgID, list);
messageManager.msgListener.recvMessageExtensionsDeleted(msgID, list);
break;
case 'onRecvNewMessage':
@ -207,18 +199,15 @@ class IMManager {
conversationManager.listener.syncServerFailed();
break;
case 'onNewConversation':
var list =
Utils.toList(data, (map) => ConversationInfo.fromJson(map));
var list = Utils.toList(data, (map) => ConversationInfo.fromJson(map));
conversationManager.listener.newConversation(list);
break;
case 'onConversationChanged':
var list =
Utils.toList(data, (map) => ConversationInfo.fromJson(map));
var list = Utils.toList(data, (map) => ConversationInfo.fromJson(map));
conversationManager.listener.conversationChanged(list);
break;
case 'onTotalUnreadMessageCountChanged':
conversationManager.listener
.totalUnreadMessageCountChanged(data ?? 0);
conversationManager.listener.totalUnreadMessageCountChanged(data ?? 0);
break;
}
} else if (call.method == ListenerType.friendListener) {
@ -239,23 +228,19 @@ class IMManager {
friendshipManager.listener.friendAdded(u);
break;
case 'onFriendApplicationAccepted':
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.listener.friendApplicationAccepted(u);
break;
case 'onFriendApplicationAdded':
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.listener.friendApplicationAdded(u);
break;
case 'onFriendApplicationDeleted':
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.listener.friendApplicationDeleted(u);
break;
case 'onFriendApplicationRejected':
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
friendshipManager.listener.friendApplicationRejected(u);
break;
case 'onFriendDeleted':
@ -272,8 +257,7 @@ class IMManager {
String data = call.arguments['data'];
switch (type) {
case 'onRecvCustomBusinessMessage':
messageManager.customBusinessListener
?.recvCustomBusinessMessage(data);
messageManager.customBusinessListener?.recvCustomBusinessMessage(data);
break;
}
} else if (call.method == ListenerType.messageKvInfoListener) {
@ -281,8 +265,7 @@ class IMManager {
String data = call.arguments['data'];
switch (type) {
case 'onMessageKvInfoChanged':
final list =
Utils.toList(data, (map) => MessageKv.fromJson(map)).toList();
final list = Utils.toList(data, (map) => MessageKv.fromJson(map)).toList();
messageManager.messageKvInfoListener?.messageKvInfoChanged(list);
break;
}
@ -291,23 +274,19 @@ class IMManager {
String data = call.arguments['data'];
switch (type) {
case 'onFriendApplicationAccepted':
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
_listenerForService?.friendApplicationAccepted(u);
break;
case 'onFriendApplicationAdded':
final u = Utils.toObj(
data, (map) => FriendApplicationInfo.fromJson(map));
final u = Utils.toObj(data, (map) => FriendApplicationInfo.fromJson(map));
_listenerForService?.friendApplicationAdded(u);
break;
case 'onGroupApplicationAccepted':
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
_listenerForService?.groupApplicationAccepted(i);
break;
case 'onGroupApplicationAdded':
final i = Utils.toObj(
data, (map) => GroupApplicationInfo.fromJson(map));
final i = Utils.toObj(data, (map) => GroupApplicationInfo.fromJson(map));
_listenerForService?.groupApplicationAdded(i);
break;
case 'onRecvNewMessage':
@ -355,8 +334,7 @@ class IMManager {
int fileSize = data['fileSize'];
int streamSize = data['streamSize'];
int storageSize = data['storageSize'];
_uploadFileListener?.uploadProgress(
id, fileSize, streamSize, storageSize);
_uploadFileListener?.uploadProgress(id, fileSize, streamSize, storageSize);
break;
case 'uploadID':
String id = data['id'];
@ -368,14 +346,12 @@ class IMManager {
int index = data['index'];
int partSize = data['partSize'];
String partHash = data['partHash'];
_uploadFileListener?.uploadPartComplete(
id, index, partSize, partHash);
_uploadFileListener?.uploadPartComplete(id, index, partSize, partHash);
break;
}
}
} catch (error, stackTrace) {
Logger.print(
"回调失败了。${call.method} ${call.arguments['type']} ${call.arguments['data']} $error $stackTrace");
Logger.print("回调失败了。${call.method} ${call.arguments['type']} ${call.arguments['data']} $error $stackTrace");
}
return Future.value(null);
});

@ -1,381 +0,0 @@
///
class DeptInfo {
/// id
String? departmentID;
///
String? faceURL;
///
String? name;
/// id
String? parentID;
///
int? order;
///
int? departmentType;
///
int? createTime;
///
int? subDepartmentNum;
///
int? memberNum;
///
String? ex;
///
String? attachedInfo;
String? relatedGroupID;
DeptInfo(
{this.departmentID,
this.faceURL,
this.name,
this.parentID,
this.order,
this.departmentType,
this.createTime,
this.subDepartmentNum,
this.memberNum,
this.ex,
this.attachedInfo,
this.relatedGroupID});
DeptInfo.fromJson(Map<String, dynamic> json) {
departmentID = json['departmentID'];
faceURL = json['faceURL'];
name = json['name'];
parentID = json['parentID'];
order = json['order'];
departmentType = json['departmentType'];
createTime = json['createTime'];
subDepartmentNum = json['subDepartmentNum'];
memberNum = json['memberNum'];
ex = json['ex'];
attachedInfo = json['attachedInfo'];
relatedGroupID = json['relatedGroupID'];
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['departmentID'] = this.departmentID;
data['faceURL'] = this.faceURL;
data['name'] = this.name;
data['parentID'] = this.parentID;
data['order'] = this.order;
data['departmentType'] = this.departmentType;
data['createTime'] = this.createTime;
data['subDepartmentNum'] = this.subDepartmentNum;
data['memberNum'] = this.memberNum;
data['ex'] = this.ex;
data['attachedInfo'] = this.attachedInfo;
data['relatedGroupID'] = this.relatedGroupID;
return data;
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is DeptInfo &&
runtimeType == other.runtimeType &&
departmentID == other.departmentID;
@override
int get hashCode => departmentID.hashCode;
}
///
class DeptMemberInfo {
/// id
String? userID;
///
String? nickname;
///
String? englishName;
///
String? faceURL;
///
int? gender;
///
String? mobile;
///
String? telephone;
///
int? birth;
///
String? email;
/// id
String? departmentID;
///
int? order;
///
String? position;
///
int? leader;
///
int? status;
///
int? createTime;
///
int? entryTime;
///
int? terminationTime;
///
String? ex;
///
String? attachedInfo;
/// 使
String? departmentName;
///
List<DeptInfo>? parentDepartmentList;
///
DeptInfo? department;
DeptMemberInfo({
this.userID,
this.nickname,
this.englishName,
this.faceURL,
this.gender,
this.mobile,
this.telephone,
this.birth,
this.email,
this.departmentID,
this.order,
this.position,
this.leader,
this.status,
this.createTime,
this.ex,
this.attachedInfo,
this.departmentName,
this.parentDepartmentList,
this.department,
});
DeptMemberInfo.fromJson(Map<String, dynamic> json) {
userID = json['userID'];
nickname = json['nickname'];
englishName = json['englishName'];
faceURL = json['faceURL'];
gender = json['gender'];
mobile = json['mobile'];
telephone = json['telephone'];
birth = json['birth'];
email = json['email'];
departmentID = json['departmentID'];
order = json['order'];
position = json['position'];
leader = json['leader'];
status = json['status'];
createTime = json['createTime'];
ex = json['ex'];
attachedInfo = json['attachedInfo'];
departmentName = json['departmentName'];
if (json['parentDepartmentList'] != null) {
parentDepartmentList = <DeptInfo>[];
json['parentDepartmentList'].forEach((v) {
parentDepartmentList!.add(DeptInfo.fromJson(v));
});
}
department = json['department'] == null
? null
: DeptInfo.fromJson(json['department']);
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['userID'] = this.userID;
data['nickname'] = this.nickname;
data['englishName'] = this.englishName;
data['faceURL'] = this.faceURL;
data['gender'] = this.gender;
data['mobile'] = this.mobile;
data['telephone'] = this.telephone;
data['birth'] = this.birth;
data['email'] = this.email;
data['departmentID'] = this.departmentID;
data['order'] = this.order;
data['position'] = this.position;
data['leader'] = this.leader;
data['status'] = this.status;
data['createTime'] = this.createTime;
data['ex'] = this.ex;
data['attachedInfo'] = this.attachedInfo;
data['departmentName'] = this.departmentName;
if (this.parentDepartmentList != null) {
data['parentDepartmentList'] =
this.parentDepartmentList!.map((v) => v.toJson()).toList();
}
data['department'] = this.department?.toJson();
return data;
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is DeptMemberInfo &&
runtimeType == other.runtimeType &&
userID == other.userID;
@override
int get hashCode => userID.hashCode;
}
///
class UserInDept {
///
DeptInfo? department;
///
DeptMemberInfo? member;
UserInDept({this.department, this.member});
UserInDept.fromJson(Map<String, dynamic> json) {
department = json['department'] != null
? DeptInfo.fromJson(json['department'])
: null;
member =
json['member'] != null ? DeptMemberInfo.fromJson(json['member']) : null;
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
if (this.department != null) {
data['department'] = this.department!.toJson();
}
if (this.member != null) {
data['member'] = this.member!.toJson();
}
return data;
}
}
///
class DeptMemberAndSubDept {
///
List<DeptInfo>? departmentList;
///
List<DeptMemberInfo>? departmentMemberList;
///
List<DeptInfo>? parentDepartmentList;
DeptMemberAndSubDept({
this.departmentList,
this.departmentMemberList,
this.parentDepartmentList,
});
DeptMemberAndSubDept.fromJson(Map<String, dynamic> json) {
if (json['departmentList'] != null) {
departmentList = <DeptInfo>[];
json['departmentList'].forEach((v) {
departmentList!.add(DeptInfo.fromJson(v));
});
}
if (json['departmentMemberList'] != null) {
departmentMemberList = <DeptMemberInfo>[];
json['departmentMemberList'].forEach((v) {
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
});
}
if (json['parentDepartmentList'] != null) {
parentDepartmentList = <DeptInfo>[];
json['parentDepartmentList'].forEach((v) {
parentDepartmentList!.add(DeptInfo.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
if (this.departmentList != null) {
data['departmentList'] =
this.departmentList!.map((v) => v.toJson()).toList();
}
if (this.departmentMemberList != null) {
data['departmentMemberList'] =
this.departmentMemberList!.map((v) => v.toJson()).toList();
}
if (this.parentDepartmentList != null) {
data['parentDepartmentList'] =
this.parentDepartmentList!.map((v) => v.toJson()).toList();
}
return data;
}
}
///
class OrganizationSearchResult {
///
List<DeptInfo>? departmentList;
///
List<DeptMemberInfo>? departmentMemberList;
OrganizationSearchResult({
this.departmentList,
this.departmentMemberList,
});
OrganizationSearchResult.fromJson(Map<String, dynamic> json) {
if (json['departmentList'] != null) {
departmentList = <DeptInfo>[];
json['departmentList'].forEach((v) {
departmentList!.add(DeptInfo.fromJson(v));
});
}
if (json['departmentMemberList'] != null) {
departmentMemberList = <DeptMemberInfo>[];
json['departmentMemberList'].forEach((v) {
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
if (this.departmentList != null) {
data['departmentList'] =
this.departmentList!.map((v) => v.toJson()).toList();
}
if (this.departmentMemberList != null) {
data['departmentMemberList'] =
this.departmentMemberList!.map((v) => v.toJson()).toList();
}
return data;
}
}

@ -1,245 +0,0 @@
import 'dart:io';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
class SignalingInfo {
///
String? userID;
///
InvitationInfo? invitation;
/// 线
OfflinePushInfo? offlinePushInfo;
SignalingInfo({
this.userID,
this.invitation,
this.offlinePushInfo,
});
SignalingInfo.fromJson(Map<String, dynamic> json) {
invitation = json['invitation'] == null
? null
: InvitationInfo.fromJson(json['invitation']);
offlinePushInfo = json['offlinePushInfo'] == null
? null
: OfflinePushInfo.fromJson(json['offlinePushInfo']);
userID = json['userID'] ?? invitation?.inviterUserID;
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['userID'] = this.userID;
data['invitation'] = this.invitation?.toJson();
data['offlinePushInfo'] = this.offlinePushInfo?.toJson();
return data;
}
}
class InvitationInfo {
/// UserID
String? inviterUserID;
/// UserID列表
List<String>? inviteeUserIDList;
/// ""
String? groupID;
/// ID
String? roomID;
///
int? timeout;
///
int? initiateTime;
/// video audio
String? mediaType;
/// [ConversationType]12
int? sessionType;
/// [Platform]
int? platformID;
InvitationInfo(
{this.inviterUserID,
this.inviteeUserIDList,
this.groupID,
this.roomID,
this.timeout,
this.initiateTime,
this.mediaType,
this.sessionType,
this.platformID});
InvitationInfo.fromJson(Map<String, dynamic> json) {
inviterUserID = json['inviterUserID'];
inviteeUserIDList = json['inviteeUserIDList']?.cast<String>();
groupID = json['groupID'];
roomID = json['roomID'];
timeout = json['timeout'];
initiateTime = json['initiateTime'];
mediaType = json['mediaType'];
sessionType = json['sessionType'];
platformID = json['platformID'];
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['inviterUserID'] = this.inviterUserID;
data['inviteeUserIDList'] = this.inviteeUserIDList;
data['groupID'] = this.groupID;
data['roomID'] = this.roomID;
data['timeout'] = this.timeout;
data['initiateTime'] = this.initiateTime;
data['mediaType'] = this.mediaType;
data['sessionType'] = this.sessionType;
data['platformID'] = this.platformID;
return data;
}
}
///
class SignalingCertificate {
/// token
String? token;
/// id
String? roomID;
///
String? liveURL;
/// 线
List<String>? busyLineUserIDList;
SignalingCertificate({
this.token,
this.roomID,
this.liveURL,
this.busyLineUserIDList,
});
SignalingCertificate.fromJson(Map<String, dynamic> json) {
token = json['token'];
roomID = json['roomID'];
liveURL = json['liveURL'];
busyLineUserIDList = null == json['busyLineUserIDList']
? null
: json['busyLineUserIDList'].cast<String>();
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['token'] = this.token;
data['roomID'] = this.roomID;
data['liveURL'] = this.liveURL;
data['busyLineUserIDList'] = this.busyLineUserIDList;
return data;
}
}
class RoomCallingInfo {
InvitationInfo? invitation;
List<Participant>? participant;
String? roomID;
String? token;
String? liveURL;
String? groupID;
RoomCallingInfo({
this.invitation,
this.participant,
this.roomID,
this.token,
this.liveURL,
this.groupID,
});
RoomCallingInfo.fromJson(Map<String, dynamic> json) {
invitation = json['invitation'] != null
? InvitationInfo.fromJson(json['invitation'])
: null;
if (json['participant'] != null) {
participant = <Participant>[];
json['participant'].forEach((v) {
participant!.add(Participant.fromJson(v));
});
}
roomID = json['roomID'] ?? invitation?.roomID;
token = json['token'];
liveURL = json['liveURL'];
groupID = json['groupID'];
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
if (this.invitation != null) {
data['invitation'] = this.invitation!.toJson();
}
if (this.participant != null) {
data['participant'] = this.participant!.map((v) => v.toJson()).toList();
}
data['roomID'] = this.roomID;
data['token'] = this.token;
data['liveURL'] = this.liveURL;
data['groupID'] = this.groupID;
return data;
}
}
class Participant {
GroupInfo? groupInfo;
GroupMembersInfo? groupMemberInfo;
UserInfo? userInfo;
Participant({this.groupInfo, this.groupMemberInfo, this.userInfo});
Participant.fromJson(Map<String, dynamic> json) {
groupInfo = json['groupInfo'] != null
? GroupInfo.fromJson(json['groupInfo'])
: null;
groupMemberInfo = json['groupMemberInfo'] != null
? GroupMembersInfo.fromJson(json['groupMemberInfo'])
: null;
userInfo =
json['userInfo'] != null ? UserInfo.fromJson(json['userInfo']) : null;
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
if (this.groupInfo != null) {
data['groupInfo'] = this.groupInfo!.toJson();
}
if (this.groupMemberInfo != null) {
data['groupMemberInfo'] = this.groupMemberInfo!.toJson();
}
if (this.userInfo != null) {
data['userInfo'] = this.userInfo!.toJson();
}
return data;
}
}
class CustomSignaling {
String? roomID;
String? customInfo;
CustomSignaling({this.roomID, this.customInfo});
CustomSignaling.fromJson(Map<String, dynamic> json) {
roomID = json['roomID'];
customInfo = json['customInfo'];
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['roomID'] = roomID;
data['customInfo'] = customInfo;
return data;
}
}

@ -551,3 +551,34 @@ class FriendApplicationInfo {
///
bool get isRejected => handleResult == -1;
}
class UserStatusInfo {
/// id
String? userID;
///
int? status;
/// ID
List<int>? platformIDs;
UserStatusInfo({
this.userID,
this.status,
this.platformIDs,
});
UserStatusInfo.fromJson(Map<String, dynamic> json) {
userID = json['userID'];
status = json['status'];
platformIDs = json['platformIDs'];
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['userID'] = this.userID;
data['status'] = this.status;
data['platformIDs'] = this.platformIDs;
return data;
}
}

Loading…
Cancel
Save