Public Access
chore: fix some linter warnings
This commit is contained in:
+6
-8
@@ -140,9 +140,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
||||
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(
|
||||
String name, {
|
||||
@@ -151,8 +148,8 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
||||
stationList = await ApiHandler.findStations(name);
|
||||
}
|
||||
|
||||
void showResult(Future<List<Station>> future_id) async {
|
||||
stationList = await future_id;
|
||||
void showResult(Future<List<Station>> futureId) async {
|
||||
stationList = await futureId;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@@ -235,7 +232,6 @@ class ChooseDeparturePage extends StatefulWidget {
|
||||
|
||||
class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
||||
List<Departure> departureList = [];
|
||||
Departure? _selectedDeparture;
|
||||
|
||||
void loadDepartures(Station startStation) async {
|
||||
departureList = await ApiHandler.departures(startStation.id);
|
||||
@@ -244,6 +240,7 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
||||
|
||||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
loadDepartures(widget.startStation);
|
||||
}
|
||||
|
||||
@@ -300,7 +297,7 @@ class DepartureList extends StatelessWidget {
|
||||
final List<Departure> departureList;
|
||||
final ValueChanged<Departure> onTapped;
|
||||
|
||||
DepartureList({
|
||||
const DepartureList({
|
||||
required this.departureList,
|
||||
required this.onTapped,
|
||||
});
|
||||
@@ -348,6 +345,7 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
||||
|
||||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
loadArrivals(widget.departure.ref);
|
||||
}
|
||||
|
||||
@@ -398,7 +396,7 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
||||
Journey journey = await Journey.fromSegment(newSegment);
|
||||
journeyId = journey.id as int;
|
||||
} else {
|
||||
Segment segment = await newSegment;
|
||||
Segment segment = newSegment;
|
||||
Journey.dbAppendJourneySegment(
|
||||
widget.journeyId as int,
|
||||
segment.id as int,
|
||||
|
||||
Reference in New Issue
Block a user