Public Access
chore: fix some linter warnings
This commit is contained in:
+7
-9
@@ -140,9 +140,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
|||||||
maxStations: 20,
|
maxStations: 20,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* TODO: function to get stations along a vehicles route past current station,
|
|
||||||
* and run the correct function on switching to the screen
|
|
||||||
*/
|
|
||||||
|
|
||||||
void findStationsByName(
|
void findStationsByName(
|
||||||
String name, {
|
String name, {
|
||||||
@@ -151,8 +148,8 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
|||||||
stationList = await ApiHandler.findStations(name);
|
stationList = await ApiHandler.findStations(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showResult(Future<List<Station>> future_id) async {
|
void showResult(Future<List<Station>> futureId) async {
|
||||||
stationList = await future_id;
|
stationList = await futureId;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +232,6 @@ class ChooseDeparturePage extends StatefulWidget {
|
|||||||
|
|
||||||
class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
||||||
List<Departure> departureList = [];
|
List<Departure> departureList = [];
|
||||||
Departure? _selectedDeparture;
|
|
||||||
|
|
||||||
void loadDepartures(Station startStation) async {
|
void loadDepartures(Station startStation) async {
|
||||||
departureList = await ApiHandler.departures(startStation.id);
|
departureList = await ApiHandler.departures(startStation.id);
|
||||||
@@ -244,6 +240,7 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
initState() {
|
initState() {
|
||||||
|
super.initState();
|
||||||
loadDepartures(widget.startStation);
|
loadDepartures(widget.startStation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,7 +297,7 @@ class DepartureList extends StatelessWidget {
|
|||||||
final List<Departure> departureList;
|
final List<Departure> departureList;
|
||||||
final ValueChanged<Departure> onTapped;
|
final ValueChanged<Departure> onTapped;
|
||||||
|
|
||||||
DepartureList({
|
const DepartureList({
|
||||||
required this.departureList,
|
required this.departureList,
|
||||||
required this.onTapped,
|
required this.onTapped,
|
||||||
});
|
});
|
||||||
@@ -348,6 +345,7 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
initState() {
|
initState() {
|
||||||
|
super.initState();
|
||||||
loadArrivals(widget.departure.ref);
|
loadArrivals(widget.departure.ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +396,7 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
|||||||
Journey journey = await Journey.fromSegment(newSegment);
|
Journey journey = await Journey.fromSegment(newSegment);
|
||||||
journeyId = journey.id as int;
|
journeyId = journey.id as int;
|
||||||
} else {
|
} else {
|
||||||
Segment segment = await newSegment;
|
Segment segment = newSegment;
|
||||||
Journey.dbAppendJourneySegment(
|
Journey.dbAppendJourneySegment(
|
||||||
widget.journeyId as int,
|
widget.journeyId as int,
|
||||||
segment.id as int,
|
segment.id as int,
|
||||||
@@ -441,4 +439,4 @@ class ArrivalList extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user