feat(ui): add page to show an overview of all journeys

This commit is contained in:
fbachus
2026-07-30 14:34:31 +02:00
parent 1b2d0de6e4
commit c313a94a10
+44
View File
@@ -503,3 +503,47 @@ class SegmentList extends StatelessWidget {
); );
} }
} }
class JourneyOverviewPage extends StatefulWidget {
const JourneyOverviewPage({super.key});
@override
State<JourneyOverviewPage> createState() => _JourneyOverviewPageState();
}
class _JourneyOverviewPageState extends State<JourneyOverviewPage> {
List<Journey> allJourneys = <Journey>[];
@override
initState() async {
super.initState();
// TODO: implement batch query to get a list (all) of journeys
//allJourneys = await Journey.dbGetAll();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: JourneyList(journeys: allJourneys),
),
);
}
}
class JourneyList extends StatelessWidget {
final List<Journey> journeys;
const JourneyList({
super.key,
required this.journeys,
});
@override
Widget build(BuildContext context) {
return ListView(
children: [
for (Journey jour in journeys)
ListTile(title: Text('${jour.startStation} to ${jour.endStation}')),
],
);
}
}