I'm new to Flutter and trying to customize the
CodePudding user response:
You can create custom dialog.
like this.
Dialog errorDialog = Dialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), //this right here
child: Container(
height: 200.0,
width: 300.0,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.all(15.0),
child: Text('Cool', style: TextStyle(color: Colors.red),),
),
Padding(
padding: EdgeInsets.all(15.0),
child: Text('Awesome', style: TextStyle(color: Colors.red),),
),
Padding(padding: EdgeInsets.only(top: 50.0)),
TextButton(onPressed: () {
Navigator.of(context).pop();
},
child: Text('Done!', style: TextStyle(color: Colors.purple, fontSize: 18.0),))
],
),
),
);
and show dialog
showDialog(context: context, builder: (BuildContext context) => errorDialog);}
CodePudding user response:
I'm using ElevatedButton
as action button, and you can choose anything and configure it. While everything is widget, you can place the way you want. You can also override the themeData.
More about