SpaceDTO.fromJson constructor
SpaceDTO.fromJson(
- Map<String, dynamic> json
)
Implementation
SpaceDTO.fromJson(Map<String, dynamic> json)
: members = (json['members'] as List)
.map((member) => SpaceMemberDTO.fromJson(member))
.toList(),
pendingMembers = (json['pendingMembers'] as List)
.map((member) => SpaceMemberDTO.fromJson(member))
.toList(),
contractAddressERC20 = json['contractAddressERC20'],
numberOfERC20 = json['numberOfERC20'],
contractAddressNFT = json['contractAddressNFT'],
numberOfNFTTokens = json['numberOfNFTTokens'],
verificationProof = json['verificationProof'],
spaceImage = json['spaceImage'],
spaceName = json['spaceName'],
isPublic = json['isPublic'],
spaceDescription = json['spaceDescription'],
spaceCreator = json['spaceCreator'],
spaceId = json['spaceId'],
meta = json['meta'],
scheduleAt = json['scheduleAt'] != null
? DateTime.parse(json['scheduleAt'])
: null,
scheduleEnd = json['scheduleEnd'] != null
? DateTime.parse(json['scheduleEnd'])
: null,
status = json['status'] != null
? chatStatusFromString(json['status'])
: null;