From f064b7ad7f29398dda88df28ff7fe38dad70a66f Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 20 Nov 2023 17:24:18 +0200 Subject: Added cart page route --- lib/main.dart | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/main.dart b/lib/main.dart index 4aea560..82a55d8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; -import 'routes.dart'; // Import your RoutesPage file -import 'login.dart'; // Import your LoginPage file -import 'cart.dart'; // Import your CartPage file +import 'routes.dart'; +import 'login.dart'; +import 'cart.dart'; +import 'order_history.dart'; void main() { runApp(MyApp()); @@ -20,12 +21,14 @@ class MyApp extends StatelessWidget { routes: { '/login': (context) => LoginPage(), '/routes': (context) => RoutesPage(), - '/cart': (context) => CartPage(selectedRide: Ride( - name: 'Sample Ride', - startLocation: 'Sample Start', - endLocation: 'Sample End', - time: 'Sample Time', - )), // Assuming a sample ride is passed to the CartPage for testing + '/order_history': (context) => OrderHistoryPage(), + '/cart': (context) => CartPage( + selectedRide: Ride( + name: 'Sample Ride', + startLocation: 'Sample Start', + endLocation: 'Sample End', + time: 'Sample Time', + )), // Assuming a sample ride is passed to the CartPage for testing }, ); } @@ -49,6 +52,7 @@ class HomePage extends StatelessWidget { '/login', '/routes', '/cart', + '/order_history', ].map>((String value) { return DropdownMenuItem( value: value, -- cgit v1.2.3