summaryrefslogtreecommitdiff
path: root/lib/routes.dart
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2023-11-20 13:45:39 +0200
committeromagdy7 <omar.professional8777@gmail.com>2023-11-20 13:45:39 +0200
commit868ac401d5e0a45d6b66bea813dda4241d93dbcc (patch)
treedecf5408061888b906fbd8d3014d488143008a5b /lib/routes.dart
parenta15bf522340de49118b0a88369a6cc892dfee9d0 (diff)
downloadcarpool-868ac401d5e0a45d6b66bea813dda4241d93dbcc.tar.xz
carpool-868ac401d5e0a45d6b66bea813dda4241d93dbcc.zip
Added login and routes page
Diffstat (limited to 'lib/routes.dart')
-rw-r--r--lib/routes.dart47
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}');
+ },
+ );
+ },
+ ),
+ );
+ }
+}