From 868ac401d5e0a45d6b66bea813dda4241d93dbcc Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 20 Nov 2023 13:45:39 +0200 Subject: Added login and routes page --- lib/routes.dart | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 lib/routes.dart (limited to 'lib/routes.dart') diff --git a/lib/routes.dart b/lib/routes.dart new file mode 100644 index 0000000..8898922 --- /dev/null +++ b/lib/routes.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; + +class Route { + final String name; + final String startLocation; + final String endLocation; + + Route( + {required this.name, + required this.startLocation, + required this.endLocation}); +} + +class RoutesPage extends StatelessWidget { + final List dummyRoutes = [ + Route( + name: 'Morning Ride - Gate 3 to Abdu-Basha', + startLocation: 'Gate 3', + endLocation: 'Abdu-Basha'), + Route( + name: 'Afternoon Ride - Abdu-Basha to Gate 3', + startLocation: 'Abdu-Basha', + endLocation: 'Gate 3'), + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text('Routes')), + body: ListView.builder( + itemCount: dummyRoutes.length, + itemBuilder: (BuildContext context, int index) { + final Route route = dummyRoutes[index]; + return ListTile( + title: Text(route.name), + subtitle: + Text('From: ${route.startLocation} - To: ${route.endLocation}'), + onTap: () { + // Handle route selection here, if needed + print('Selected route: ${route.name}'); + }, + ); + }, + ), + ); + } +} -- cgit v1.2.3