diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-11-20 13:45:39 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-11-20 13:45:39 +0200 |
| commit | 868ac401d5e0a45d6b66bea813dda4241d93dbcc (patch) | |
| tree | decf5408061888b906fbd8d3014d488143008a5b /lib/routes.dart | |
| parent | a15bf522340de49118b0a88369a6cc892dfee9d0 (diff) | |
| download | carpool-868ac401d5e0a45d6b66bea813dda4241d93dbcc.tar.xz carpool-868ac401d5e0a45d6b66bea813dda4241d93dbcc.zip | |
Added login and routes page
Diffstat (limited to 'lib/routes.dart')
| -rw-r--r-- | lib/routes.dart | 47 |
1 files changed, 47 insertions, 0 deletions
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<Route> 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}'); + }, + ); + }, + ), + ); + } +} |
