diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-12-20 19:40:11 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-12-20 19:40:11 +0200 |
| commit | b84fe9a9c4c18a3f4e957f76ead34403c4316f76 (patch) | |
| tree | 14e4b37ae137ed538eaa14af4228c41033facac8 /mobile/lib/payement_order.dart | |
| parent | 953b5ce3ad7e933c6f008202346fe5bf2985bf9e (diff) | |
| download | carpool-b84fe9a9c4c18a3f4e957f76ead34403c4316f76.tar.xz carpool-b84fe9a9c4c18a3f4e957f76ead34403c4316f76.zip | |
Added a simple Login and SignUp page for the web driver app
Diffstat (limited to 'mobile/lib/payement_order.dart')
| -rw-r--r-- | mobile/lib/payement_order.dart | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/mobile/lib/payement_order.dart b/mobile/lib/payement_order.dart new file mode 100644 index 0000000..eac05ec --- /dev/null +++ b/mobile/lib/payement_order.dart @@ -0,0 +1,81 @@ +import 'package:flutter/material.dart'; +import 'credit_card_payment.dart'; + +class Order { + final String orderID; + final String rideName; + final String status; + final double amount; + + Order( + {required this.orderID, + required this.rideName, + required this.status, + required this.amount}); +} + +class PaymentOrderTrackingPage extends StatelessWidget { + final List<Order> orders = [ + Order( + orderID: '001', + rideName: 'Morning Ride - Gate 3 to Abdu-Basha', + status: 'Completed', + amount: 15.0), + Order( + orderID: '002', + rideName: 'Afternoon Ride - Abdu-Basha to Gate 3', + status: 'Pending', + amount: 12.5), + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Payment & Order Tracking'), + ), + body: ListView.builder( + itemCount: orders.length, + itemBuilder: (BuildContext context, int index) { + final Order order = orders[index]; + return GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + CreditCardDetailsPage(orderID: order.orderID), + ), + ); + }, + child: Card( + elevation: 3, + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + child: ListTile( + title: Text( + 'Order ID: ${order.orderID}', + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Ride: ${order.rideName}'), + Text('Status: ${order.status}'), + Text('Amount: \$${order.amount.toStringAsFixed(2)}'), + ], + ), + leading: Icon(Icons + .payment), // TODO Use an appropriate icon for payment/order tracking + ), + ), + ); + }, + ), + ); + } +} |
