Skip to content

Commit 4a0af90

Browse files
committed
added user class and a database class and did required changes in LoginForm. COmmented(landing page)
1 parent 7ca64b6 commit 4a0af90

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

lib/bookingdetails.dart

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class BookingDetails extends StatelessWidget{
5656
List<String> carpools = ["Ishaan Jalan", "Rudransh Dixit", "hewwo", "manda", "ramesh", "mukesh", "sukesh", "nilesh"];
5757

5858

59-
6059
@override
6160
Widget build(BuildContext context) {
6261
avlblcarpools();
@@ -106,7 +105,48 @@ class BookingDetails extends StatelessWidget{
106105
backgroundColor: Colors.black,
107106
floatingActionButton: FloatingActionButton(
108107
heroTag: "button2",
109-
onPressed: (){},
108+
onPressed: (){
109+
Navigator.push(context, MaterialPageRoute(builder: (context) => AlertDialog(
110+
backgroundColor: Color(0xFF212121),
111+
shape: RoundedRectangleBorder(
112+
borderRadius: BorderRadius.circular(14),
113+
),
114+
title: const Center(
115+
child: Text(
116+
'Cancel Booking',
117+
style: TextStyle(color: Colors.white, fontSize: 18),
118+
),
119+
),// To display the title it is optional
120+
content: const Text(
121+
'Are you sure you want to cancel the booking?',
122+
style: TextStyle(color: Colors.white),
123+
), // Message which will be pop up on the screen
124+
// Action widget which will provide the user to acknowledge the choice
125+
actions: [
126+
TextButton( // FlatButton widget is used to make a text to work like a button
127+
onPressed: () {
128+
Navigator.pop(context);
129+
Navigator.pop(context);
130+
}, // function used to perform after pressing the button
131+
child: const Text(
132+
'YES',
133+
style: TextStyle(color: Colors.red),
134+
),
135+
),
136+
TextButton(
137+
onPressed: () {
138+
Navigator.pop(context);
139+
},
140+
child: const Text(
141+
'NO',
142+
style: TextStyle(color: Colors.green),
143+
),
144+
),
145+
],
146+
),
147+
),
148+
);
149+
},
110150
backgroundColor: Colors.red,
111151
child: const Icon(
112152
Icons.delete,

0 commit comments

Comments
 (0)