New some function

This commit is contained in:
hrxiang
2022-03-31 11:08:11 +08:00
parent e009224256
commit 197f0b482f
14 changed files with 116 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ class ConversationInfo {
String? draftText;
int? draftTextTime;
bool? isPinned;
bool? isPrivateChat;
String? ext;
ConversationInfo(
@@ -34,6 +35,7 @@ class ConversationInfo {
this.latestMsgSendTime,
this.draftText,
this.draftTextTime,
this.isPrivateChat,
this.isPinned});
ConversationInfo.fromJson(Map<String, dynamic> json)
@@ -56,6 +58,7 @@ class ConversationInfo {
draftText = json['draftText'];
draftTextTime = json['draftTextTime'];
isPinned = json['isPinned'];
isPrivateChat = json['isPrivateChat'];
}
Map<String, dynamic> toJson() {
@@ -73,6 +76,7 @@ class ConversationInfo {
data['draftText'] = this.draftText;
data['draftTextTime'] = this.draftTextTime;
data['isPinned'] = this.isPinned;
data['isPrivateChat'] = this.isPrivateChat;
return data;
}

View File

@@ -7,6 +7,7 @@ class GroupInfo {
String? ownerUserID;
int? createTime;
int? memberCount;
/// ok = 0 blocked = 1 Dismissed = 2 Muted = 3
int? status;
String? creatorUserID;
int? groupType;
@@ -70,6 +71,7 @@ class GroupMembersInfo {
int? joinSource;
String? operatorUserID;
String? ext;
int? muteEndTime;
GroupMembersInfo({
this.groupID,
@@ -81,6 +83,7 @@ class GroupMembersInfo {
this.ext,
this.joinSource,
this.operatorUserID,
this.muteEndTime,
});
GroupMembersInfo.fromJson(Map<String, dynamic> json) {
@@ -93,6 +96,7 @@ class GroupMembersInfo {
ext = json['ext'];
joinSource = json['joinSource'];
operatorUserID = json['operatorUserID'];
muteEndTime = json['muteEndTime'];
}
Map<String, dynamic> toJson() {
@@ -106,6 +110,7 @@ class GroupMembersInfo {
data['ext'] = this.ext;
data['joinSource'] = this.joinSource;
data['operatorUserID'] = this.operatorUserID;
data['muteEndTime'] = this.muteEndTime;
return data;
}
}

View File

@@ -581,18 +581,21 @@ class FaceElem {
class AttachedInfoElem {
GroupHasReadInfo? groupHasReadInfo;
bool? isPrivateChat;
AttachedInfoElem({this.groupHasReadInfo});
AttachedInfoElem({this.groupHasReadInfo, this.isPrivateChat});
AttachedInfoElem.fromJson(Map<String, dynamic> json) {
groupHasReadInfo = json['groupHasReadInfo'] == null
? null
: GroupHasReadInfo.fromJson(json['groupHasReadInfo']);
isPrivateChat = json['isPrivateChat'];
}
Map<String, dynamic> toJson() {
final data = Map<String, dynamic>();
data['groupHasReadInfo'] = this.groupHasReadInfo?.toJson();
data['isPrivateChat'] = this.isPrivateChat;
return data;
}
}