ChatGroup.fromJson constructor
ChatGroup.fromJson( - Map map
)
Implementation
factory ChatGroup.fromJson(Map map) {
String groupId = map['groupId'];
String? name = map["name"];
String? description = map["desc"];
String? owner = map["owner"];
String? announcement = map["announcement"];
int? memberCount = map["memberCount"];
List<String>? memberList = map.getList("memberList");
List<String>? adminList = map.getList("adminList");
List<String>? blockList = map.getList("blockList");
List<String>? muteList = map.getList("muteList");
bool? messageBlocked = map["messageBlocked"];
bool? isAllMemberMuted = map["isAllMemberMuted"];
ChatGroupPermissionType? permissionType =
permissionTypeFromInt(map['permissionType']);
int? maxUserCount = map["maxUserCount"];
bool? isMemberOnly = map["isMemberOnly"];
bool? isMemberAllowToInvite = map["isMemberAllowToInvite"];
bool? isDisabled = map["isDisabled"];
String? extension = map["ext"];
return ChatGroup._private(
groupId: groupId,
name: name,
description: description,
owner: owner,
announcement: announcement,
memberCount: memberCount,
memberList: memberList,
adminList: adminList,
blockList: blockList,
muteList: muteList,
messageBlocked: messageBlocked,
isAllMemberMuted: isAllMemberMuted,
permissionType: permissionType,
maxUserCount: maxUserCount,
isMemberOnly: isMemberOnly,
isMemberAllowToInvite: isMemberAllowToInvite,
extension: extension,
isDisabled: isDisabled ?? false,
);
}