TerminusTrain class
Represents a train that is either the first or last train of the day at a station.
Constructors
- TerminusTrain({required Time time, required String destination})
-
Creates a TerminusTrain.
const
- TerminusTrain.empty()
- Creates an empty TerminusTrain.
-
TerminusTrain.fromJson(Map<
String, dynamic> json) -
Creates a TerminusTrain from JSON data.
factory
Properties
- destination → String
-
Station code for the train's destination.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Whether or not this TerminusTrain is empty.
no setter
- isNotEmpty → bool
-
Whether or not this TerminusTrain is not empty.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- time → Time
-
The time that the train leaves the station.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Returns a JSON representation of this TerminusTrain.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override