BusProvider class

A provider for Bus data.

Implemented as a collection of functions that utilizes a REST API to retrieve json files of bus data. Each member function decodes a json file and returns a dart iterable containing the relevent bus data object.

Constructors

BusProvider()

Properties

getIsConnected bool
The status of the most recent fetch call.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isConnected bool
The connection status of BusProvider.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createJSONFile(String fileName, dynamic response) Future
Creates a JSON file fileName and stores it in a local directory. [...]
fetch(String type, {Map<String, String> query}) Future
Fetchs data from the JSON API and returns a decoded JSON.
getBusTimeTable() Future<Map<String, List<BusTimeTable>>>
Returns a Map of <BusStop,BusTimeTable>
getRoutes() Future<Map<String, BusRoute>>
Returns a Map of <BusRoute.routeShortName, BusRoute> pairs.
getShapes() Future<Map<String, BusShape>>
Returns a List of BusShape objects.
getStops() Future<List<BusStop>>
Returns a List of BusStop objects.
getTrip() Future<List<BusTrip>>
Returns a List of BusTrip objects.
getTripUpdates() Future<List<BusTripUpdate>>
Returns a List of BusTripUpdate objects.
getVehicleUpdates() Future<List<BusVehicleUpdate>>
Returns a List of BusVehicleUpdate objects.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited