Guest class

Constructors

Guest({String? nationality, String? countryOfResidence, String? title, String? firstName, String? lastName, String? middleName, int? age})
Returns a new Guest instance.

Properties

age ↔ int?
Age in years; null when none was given. A guest is a child when it is 0–17 and an adult when it is 18 or more or null.
getter/setter pair
countryOfResidence ↔ String?
Two-letter ISO 3166-1 alpha-2 country of residence as sent; null when none was sent. Always null in booking: the booking keeps none.
getter/setter pair
firstName ↔ String?
First name.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
lastName ↔ String?
Last name.
getter/setter pair
middleName ↔ String?
Middle name; null when there is none.
getter/setter pair
nationality ↔ String?
Two-letter ISO 3166-1 alpha-2 nationality as sent; null when none was sent. Always null in booking: the booking keeps none.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title ↔ String?
Title, for example Mr, Mrs or Miss; null when there is none.
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) → Guest?
Returns a new Guest instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Guest>
mapFromJson(dynamic json) → Map<String, Guest>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Guest>>

Constants

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