Segment class

Constructors

Segment({Airport? origin, Airport? destination, DateTime? departureAt, DateTime? arrivalAt, int? durationMinutes, Airline? marketingCarrier, String? marketingFlightNumber, Airline? operatingCarrier, String? operatingFlightNumber, Aircraft? aircraft, List<Stop> stops = const [], bool? isCodeshare})
Returns a new Segment instance.

Properties

aircraft ↔ Aircraft?
The aircraft type, when the airline gives it.
getter/setter pair
arrivalAt ↔ DateTime?
Local arrival time.
getter/setter pair
departureAt ↔ DateTime?
Local departure time.
getter/setter pair
destination ↔ Airport?
Where the leg lands.
getter/setter pair
durationMinutes ↔ int?
Flying time of the leg.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
isCodeshare ↔ bool?
Whether another airline than the marketing carrier flies the leg.
getter/setter pair
marketingCarrier ↔ Airline?
The airline that sells the leg under its flight number.
getter/setter pair
marketingFlightNumber ↔ String?
The marketing carrier's flight number.
getter/setter pair
operatingCarrier ↔ Airline?
The airline that flies the leg.
getter/setter pair
operatingFlightNumber ↔ String?
The operating carrier's flight number.
getter/setter pair
origin ↔ Airport?
Where the leg departs.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stops ↔ List<Stop>
Technical stops without a change of aircraft.
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) → Segment?
Returns a new Segment instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Segment>
mapFromJson(dynamic json) → Map<String, Segment>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Segment>>

Constants

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