toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
  "detail1": detail1,
  "detail2": detail2,
  "tags": List<dynamic>.from(tags.map((int x) => x)),
  "id": id,
  "creatorId": creatorId,
  "title": title,
  "capacity": capacity,
  "pricePerNight": pricePerNight,
  "hotelId": hotelId,
  "roomNumber": roomNumber,
  "quantity": quantity,
  "isAvailable": isAvailable,
  "description": description,
  "bedType": bedType,
  "sizeSquareMeters": sizeSquareMeters,
  "floor": floor,
  "amenities": amenities == null ? null : List<dynamic>.from(amenities!.map((String x) => x)),
  "adminUserIds": adminUserIds == null ? <dynamic>[] : List<dynamic>.from(adminUserIds!.map((String x) => x)),
};