Reputation: 1935
How Can I Create UserInterface(Flutter AlertDialog) exactly like this?
Upvotes: 0
Views: 35
Reputation: 316
you can make custom AlertDialog using Dialog
widget. here i made example:
showDialog(
context: context,
builder: (ctx) => Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
backgroundColor: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
Center(
child: Text(
'Delete your account',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
),
),
),
SizedBox(height: 10.0),
Text(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Incidunt magnam quisquam ',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.grey,
fontSize: 15.0,
),
),
],
),
),
SizedBox(height: 15.0),
Row(
children: [
Expanded(
child: InkWell(
onTap: () {},
child: Container(
height: 50,
decoration: BoxDecoration(
color: Colors.grey[100],
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(15.0),
),
),
child: Center(child: Text('YES')),
),
),
),
Expanded(
child: InkWell(
onTap: () {},
child: Container(
height: 50,
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(15.0),
),
),
child: Center(
child: Text(
'NO',
style: TextStyle(color: Colors.white),
),
),
),
),
),
],
),
],
),
),
);
Upvotes: 1