Now Departing

All things Flutter

Now Departing

Now Departing is a Flutter mobile app for both Android and iOS(iPhone) that communicates with the UK Live Departure Board Web Service (LDBWS) provided by National Rail Enquiries to look up specific departures from one station to another.

The iPhone version of the app can be found here

The Android version of the app can be found here

 

 

Some of the Flutter features of this app are:

  • External API access
  • Storage of JSON data on device
  • Preference data storage
  • SQLite data storage

External API access

Now Departing interfaces to an external API service that we created to ‘talk’ to the Darwin Live Departure Boards Web Service (LDBWS) provided by National Rail.

 

Storage of JSON data on device

When Now Departing starts up, it reads a JSON list of available station names from the external API. This data is then stored on device as a string of JSON data.

This means that when a user is searching for a station we read in the device stored list and do not keep querying the external API for the same information. The station list can be updated, in case of additional stations added, by doing a pull-to-refresh on the station list.

Preference data storage

The app uses various user preferences to operate such as

  • Departing Station
  • Destination Station
  • Departure Time

These are all stored using the Flutter Shared Preferences plug-in.

SQLite data storage

When a journey is selected it is automatically saved in a list so that it is easily accessible the next time. This list is persisted on device in a SQLite database using the sqflite plug-in.