diff --git a/lib/main.dart b/lib/main.dart index 20ddd7f..284c60a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -61,8 +61,8 @@ class _MyHomePageState extends State { } // TODO :find a better way to show the list - void showResult(Future> future_id) async { - stationList = await future_id; + void showResult(Future> futureId) async { + stationList = await futureId; id = stationList[0].id; setState(() {}); } diff --git a/lib/transport_helper.dart b/lib/transport_helper.dart index 0fe9d58..8428f35 100644 --- a/lib/transport_helper.dart +++ b/lib/transport_helper.dart @@ -2,7 +2,6 @@ import 'package:sqflite/sqflite.dart'; // import './state_helper.dart'; // import './db_helper.dart'; -// TODO: get access to DB class DbHelper { static late Database db; @@ -106,7 +105,6 @@ class Journey { } // from trip API request - // TODO: how to connect this best with the database for read/write? factory Journey.fromJson(Map json) { Journey newJourney = Journey( segments: json["LegList"]["Leg"].map((leg) => Segment.fromJson(leg)), @@ -558,7 +556,6 @@ class Station { .toList(); } - //TODO: usage factory Station.fromMap( Map map, { List? stationLines, @@ -1106,4 +1103,4 @@ enum VehicleType { subway, regionalTrain, PLACEHOLDER, -} +} \ No newline at end of file