dart_connect_metro library

Classes

AdaIncident
Represents an incident affecting a station elevator or escalator.
Address
Represents the address of a station.
AllDayParking
Represents all-day parking information at a station.
BusIncident
Represents a bus incident.
BusPosition
Represents the real world position of a bus.
DayTimings
Represents the timing of certain events at a station on a given day.
Line
Represents a rail line.
NextBuses
Contains a set of predictions for the next buses at a stop.
NextTrain
Represents the next trains arriving at a station.
Parking
Represents parking information at a station.
Path
PathDetails
Represents the path details for a bus route on a given date.
PathDetailsDirection
Represents a direction of a bus route.
PathItem
Represents a path between two stations.
Prediction
Represents a prediction for a bus arrival at a stop.
RailFare
Represents the fare for a rail journey.
RailIncident
Represents a rail incident.
Route
Represents a bus route.
RouteTrackCircuit
Represents a track circuit.
Schedule
Represents a bus route schedule.
ScheduleArrival
Represents a scheduled arrival of a bus at a stop.
ScheduleAtStop
Represents a schedule at a stop.
ScheduleDirection
Represents a direction of a bus route in a schedule.
ScheduleStop
Represents a stop in a schedule.
ShapePoint
ShortTermParking
Represents short-term parking information at a station.
StandardRoute
Standard route model.
Station
Contains information about a station.
StationEntrance
Represents an entrance to a station.
StationTimings
Represents the timing info at a station.
StationToStation
Information about a station to station journey.
Stop
Represents a bus stop.
TerminusTrain
Represents a train that is either the first or last train of the day at a station.
Time
Represents a time of day.
TrackCircuit
Represents a track circuit.
TrackCircuitNeighbor
Represents a track circuit neighbor.
TrainPosition
Represents the position of a train.

Enums

AdaUnitType
Enum representing the type of unit.
NeighborType
The type of neighbor of a track circuit.
ServiceType
The type of service of a train.
TrainStatus
Represents the status of a train.

Extensions

DateTimeFormatter on DateTime
Extension on DateTime to format it to WMATA API format.

Properties

emptyDateTime DateTime
Returns an empty DateTime.
no setter
emptyTime Time
Returns an empty Time.
no setter

Functions

calculateDistance(double lat1, double lon1, double lat2, double lon2) double
Calculate distance between two coordinates in meters.
fetchAdaIncidents(String apiKey, {String? stationCode}) Future<List<AdaIncident>>
Fetches ADA incidents.
fetchAllBusPositions(String apiKey) Future<List<BusPosition>>
Fetches all bus positions.
fetchAllStationEntrances(String apiKey) Future<List<StationEntrance>>
Fetches all station entrances.
fetchAllStops(String apiKey) Future<List<Stop>>
Fetches all bus stops.
fetchApiKeyValidation(String apiKey) Future<bool>
Fetches the validation of an API key.
fetchBusIncidents(String apiKey, {String? routeId}) Future<List<BusIncident>>
Fetches bus incidents for a specific route.
fetchBusPositionsForLocation(String apiKey, {required double latitude, required double longitude, required double radiusMeters}) Future<List<BusPosition>>
Fetches bus positions for a specific location.
fetchBusPositionsForRoute(String apiKey, {required String routeId}) Future<List<BusPosition>>
Fetches bus positions for a specific route.
fetchBusPositionsForRouteAndLocation(String apiKey, {required String routeId, required double latitude, required double longitude, required double radiusMeters}) Future<List<BusPosition>>
Fetches bus positions for a specific route and location.
fetchLines(String apiKey) Future<List<Line>>
Fetches the metro rail lines.
fetchNextBuses(String apiKey, {required String stopId}) Future<NextBuses>
Fetches the next buses for a given stop.
fetchNextTrains(String apiKey, {List<String>? stationCodes}) Future<List<NextTrain>>
Fetches the next trains for the given station codes.
fetchParking(String apiKey, {String? stationCode}) Future<List<Parking>>
Fetches parking information.
fetchPath(String apiKey, {required String startStationCode, required String destinationStationCode}) Future<Path>
Fetches the path between two stations.
fetchPathDetails(String apiKey, {required String routeId, DateTime? date}) Future<PathDetails>
Fetches path details for a specific route.
fetchRailIncidents(String apiKey) Future<List<RailIncident>>
Fetches rail incidents.
fetchRoutes(String apiKey) Future<List<Route>>
Fetches the routes from the WMATA API.
fetchSchedule(String apiKey, {required String routeId, DateTime? date, bool? includingVariations}) Future<Schedule>
Fetches the schedule for a route.
fetchScheduleAtStop(String apiKey, {required String stopId, DateTime? date}) Future<ScheduleAtStop>
Fetches the schedule for a specific stop.
fetchStandardRoutes(String apiKey) Future<List<StandardRoute>>
Fetches standard routes from the WMATA API.
fetchStation(String apiKey, {required String stationCode}) Future<Station>
Fetches the station info for the given stationCode.
fetchStationEntrancesForLocation(String apiKey, {required double latitude, required double longitude, required double radiusMeters}) Future<List<StationEntrance>>
Fetches all station entrances.
fetchStations(String apiKey, {String? lineCode}) Future<List<Station>>
Fetches the station info for all stations.
fetchStationTimings(String apiKey, {String? stationCode}) Future<List<StationTimings>>
Fetches station timing info.
fetchStationToStation(String apiKey, {String? startStationCode, String? destinationStationCode}) Future<List<StationToStation>>
Fetches the station to station information for the given stations.
fetchStopsForLocation(String apiKey, {required double latitude, required double longitude, required double radiusMeters}) Future<List<Stop>>
Fetches bus stops for a specific location.
fetchTrackCircuits(String apiKey) Future<List<TrackCircuit>>
Fetches all track circuits.
fetchTrainPositions(String apiKey) Future<List<TrainPosition>>
Fetches all train positions.