GroupMemberEntity.fromJson constructor

GroupMemberEntity.fromJson(
  1. dynamic data
)

Implementation

GroupMemberEntity.fromJson(data) {
  Map<String, dynamic> json =
      data is Map ? data.cast<String, dynamic>() : jsonDecode(data);
  if (json['userID'] != null) userID = json['userID'];
  if (json['nickName'] != null) nickName = json['nickName'];
  if (json['friendRemark'] != null) friendRemark = json['friendRemark'];
  if (json['faceUrl'] != null) faceUrl = json['faceUrl'];
  if (json['role'] != null) role = GroupMemberRoleTool.getByInt(json['role']);
  if (json['muteUntil'] != null) muteUntil = json['muteUntil'];
  if (json['joinTime'] != null) joinTime = json['joinTime'];
  if (json['customInfo'] != null)
    customInfo = (json['customInfo'] as Map).cast<String, String>();
  if (json['nameCard'] != null) nameCard = json['nameCard'];
}