-
Notifications
You must be signed in to change notification settings - Fork 0
5.AlerDialog
Siddhant edited this page Jun 3, 2019
·
1 revision
void bookFlight(BuildContext context)
{
var alertDialog=AlertDialog(
title: Text("Flight Booked successfully"),
content: Text("have a pleasant Flight"),
);
showDialog(context: context,
builder: (BuildContext context)=>alertDialog
);
}
class FlightBookButton extends StatelessWidget
{
@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
margin: EdgeInsets.only(top: 30.0),
width: 250.0,
height: 60.0,
child: RaisedButton(
child: Text("Book Your Ticket",
style: TextStyle(
fontSize: 16.0
),),
color: Colors.deepOrange,
elevation: 6.0,
onPressed:() => bookFlight(context)
),
);
}