BusPosition class

Represents the real world position of a bus.

Constructors

BusPosition({required DateTime dateTime, required int deviationMinutes, required String direction, required double latitude, required double longitude, required String routeId, required DateTime tripStartTime, required DateTime tripEndTime, required String tripHeadsign, required String tripId, required String vehicleId})
Creates a BusPosition object.
BusPosition.empty()
Creates an empty BusPosition object.
BusPosition.fromJson(Map<String, dynamic> json)
Creates a BusPosition object from a JSON object.
factory

Properties

dateTime DateTime
Date and time (Eastern Standard Time) of last position update.
final
deviationMinutes int
Deviation, in minutes, from schedule.
final
direction String
General direction of the trip, not the bus itself (e.g.: NORTH, SOUTH, EAST, WEST).
final
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Whether or not this object is empty.
no setter
isNotEmpty bool
Whether or not this object is not empty.
no setter
latitude double
Last reported Latitude of the bus.
final
longitude double
Last reported Longitude of the bus.
final
routeId String
Base route name as shown on the bus.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tripEndTime DateTime
Scheduled end date and time (Eastern Standard Time) of the bus's current trip.
final
tripHeadsign String
Destination of the bus.
final
tripId String
Unique trip ID.
final
tripStartTime DateTime
Scheduled start date and time (Eastern Standard Time) of the bus's current trip.
final
vehicleId String
Unique identifier for the bus. This is usually visible on the bus itself.
final

Methods

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

Operators

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