Public Access
feat(departures): make some adaptations to supp diff departure srces
with these adaptations to the api_handler and Departure.fromJson, the fromJson-factory now works for responses from both /departureBoard and /tripDetail for /tripDetail a little json-copying is used, see ApiHandler._expandDeparturesJson
This commit is contained in:
+3
-3
@@ -348,7 +348,7 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
height: 400,
|
||||
child: DepartureList(
|
||||
child: ArrivalList(
|
||||
departureList: departureList,
|
||||
onTapped: _handleArrivalTapped,
|
||||
),
|
||||
@@ -398,11 +398,11 @@ class ArrivalList extends StatelessWidget {
|
||||
children: [
|
||||
for (Departure departure in departureList)
|
||||
ListTile(
|
||||
title: Text(departure.stationId),
|
||||
title: Text(departure.stationName),
|
||||
subtitle: Text(departure.arrivalTime.toString()),
|
||||
onTap: () => onTapped(departure),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user