I use this method to show a AlertDialog:
_onSubmit(message) {
if (message.isNotEmpty) {
showDialog(
context: context,
barrierDismis
I use this method to align buttons in actions of AlertDialog.
AlertDialog style:
AlertDialog( title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('Tilte'), CloseButton( color: Color(0xFFD5D3D3), onPressed: () { Navigator.of(context).pop(); }) ]), content: SingleChildScrollView(child: Text("Boby")), actions: [ SizedBox( width: MediaQuery.of(context).size.width, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ ButtonTheme( minWidth: 25.0, height: 25.0, child: OutlineButton( borderSide: BorderSide(color: Colors.blueAccent), child: new Text("Save"), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20)), onPressed: () {})), SizedBox(width: 8.0), ButtonTheme( minWidth: 25.0, height: 25.0, child: OutlineButton( borderSide: BorderSide(color: Colors.black26), textColor: Colors.blue, child: new Text("Close"), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20)), onPressed: () {})) ])) ]);