diff --git a/lib/main.dart b/lib/main.dart index 399ddc5..134e900 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -502,4 +502,48 @@ class SegmentList extends StatelessWidget { ], ); } -} \ No newline at end of file +} + +class JourneyOverviewPage extends StatefulWidget { + const JourneyOverviewPage({super.key}); + @override + State createState() => _JourneyOverviewPageState(); +} + +class _JourneyOverviewPageState extends State { + List allJourneys = []; + + @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 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}')), + ], + ); + } +}