GroupInfoEntity.fromJson constructor

GroupInfoEntity.fromJson(
  1. dynamic data
)

Implementation

GroupInfoEntity.fromJson(data) {
  Map<String, dynamic> json = data is Map ? data.cast<String, dynamic>() : jsonDecode(data);
  if (json['groupID'] != null) groupID = json['groupID'];
  if (json['groupType'] != null) groupType = GroupTypeTool.getByString(json["groupType"]);
  if (json['groupName'] != null) groupName = json['groupName'];
  if (json['notification'] != null) notification = json['notification'];
  if (json['introduction'] != null) introduction = json['introduction'];
  if (json['faceUrl'] != null) faceUrl = json['faceUrl'];
  if (json['allMuted'] != null) allMuted = json['allMuted'];
  if (json['owner'] != null) owner = json['owner'];
  if (json['createTime'] != null) createTime = json['createTime'];
  if (json['groupAddOpt'] != null) groupAddOpt = GroupAddOptTool.getByInt(json["groupAddOpt"]);
  if (json['lastInfoTime'] != null) lastInfoTime = json['lastInfoTime'];
  if (json['lastMessageTime'] != null) lastMessageTime = json['lastMessageTime'];
  if (json['memberCount'] != null) memberCount = json['memberCount'];
  if (json['onlineCount'] != null) onlineCount = json['onlineCount'];
  if (json['role'] != null) role = GroupMemberRoleTool.getByInt(json["role"]);
  if (json['recvOpt'] != null) recvOpt = GroupReceiveMessageOptTool.getByInt(json["recvOpt"]);
  if (json['joinTime'] != null) joinTime = json['joinTime'];
  if (json['customInfo'] != null) customInfo = (json['customInfo'] as Map).cast<String, String>();
}