SearchRoomsResponse.fromJson constructor

SearchRoomsResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SearchRoomsResponse.fromJson(Map<String, dynamic> json) {
  return SearchRoomsResponse(
    nextToken: json['NextToken'] as String?,
    rooms: (json['Rooms'] as List?)
        ?.whereNotNull()
        .map((e) => RoomData.fromJson(e as Map<String, dynamic>))
        .toList(),
    totalCount: json['TotalCount'] as int?,
  );
}