SpaceHierarchyRoomsChunk.fromJson constructor

SpaceHierarchyRoomsChunk.fromJson(
  1. Map<String, Object?> json
)

Implementation

SpaceHierarchyRoomsChunk.fromJson(Map<String, Object?> json)
    : allowedRoomIds = ((v) => v != null
          ? (v as List).map((v) => v as String).toList()
          : null)(json['allowed_room_ids']),
      childrenState = (json['children_state'] as List)
          .map((v) => ChildrenState.fromJson(v as Map<String, Object?>))
          .toList(),
      encryption =
          ((v) => v != null ? v as String : null)(json['encryption']),
      roomType = ((v) => v != null ? v as String : null)(json['room_type']),
      roomVersion =
          ((v) => v != null ? v as String : null)(json['room_version']);