Room class

Constructors

Room({String? roomGroupKey, required String name, String? description, List<Bed> beds = const [], int? maxOccupancy, num? sizeSquareMeters, List<String> amenities = const [], List<String> imageUrls = const [], required int roomIndex, int? adultsCount, int? childrenCount, List<int>? childrenAges = const []})
Returns a new Room instance.

Properties

adultsCount ↔ int?
Number of adults for this specific room
getter/setter pair
amenities ↔ List<String>
getter/setter pair
beds ↔ List<Bed>
getter/setter pair
childrenAges ↔ List<int>?
Ages of the children for the searched occupancy of this room.
getter/setter pair
childrenCount ↔ int?
Number of children for this specific room
getter/setter pair
description ↔ String?
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
imageUrls ↔ List<String>
getter/setter pair
maxOccupancy ↔ int?
getter/setter pair
name ↔ String
getter/setter pair
roomGroupKey ↔ String?
Identifies the physical room across every rate that sells it, so rates can be grouped per room. Null means the room could not be identified; group nothing on a null rather than treating it as a group.
getter/setter pair
roomIndex ↔ int
1-based room index (1 = first room, 2 = second room, and so on). Send the same index with each room's guests when ordering, so every room is matched to its occupancy in a multi-room booking.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeSquareMeters ↔ num?
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Room?
Returns a new Room instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Room>
mapFromJson(dynamic json) → Map<String, Room>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Room>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.