NextTrain class
Represents the next trains arriving at a station.
Constructors
- NextTrain({required String locationCode, required String locationName, int? numCars, required String destination, String? destinationCode, String? destinationName, required int group, required String line, required int? minutesAway, TrainStatus? specialStatus})
- Creates a new NextTrain instance.
- NextTrain.empty()
- Creates an empty NextTrain instance.
-
NextTrain.fromJson(Map<
String, dynamic> json) -
Creates a new NextTrain instance from a JSON object.
factory
Properties
- destination → String
-
Abbreviated version of the final destination for a train.
final
- destinationCode → String?
-
Unique identifier for the final destination station.
final
- destinationName → String?
-
Full name of the final destination station.
final
- group → int
-
Denotes the track this train is on, but does not necessarily equate to
Track 1 or Track 2.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Whether or not this NextTrain instance is empty.
no setter
- isNotEmpty → bool
-
Whether or not this NextTrain instance is not empty.
no setter
- line → String
-
Two-letter abbreviation for the line (e.g.: RD, BL, YL, OR, GR, or SV).
final
- locationCode → String
-
Unique identifier for the station.
final
- locationName → String
-
Full name of the station where the train is arriving.
final
- minutesAway → int?
-
Minutes until train arrival at this stop.
final
- numCars → int?
-
Number of cars on the train.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- specialStatus → TrainStatus?
-
The status of the train.
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 NextTrain instance.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override