Вот код, надеюсь, он будет полезен.
Скриншот
Dialog errorDialog = Dialog(
//this right here
child: Theme(
data: ThemeData().copyWith(
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(),
),
),
child: Container(
color: Colors.blueGrey[100],
height: MediaQuery.of(context).size.height / 3.5,
width: MediaQuery.of(context).size.width / 1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("Minimum Password Length"),
Text(": 6")
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("Minimum Password Uppercase Characters"),
Text(": 1")
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("Minimum Password lowercase Characters"),
Text(": 1")
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("Minimum Password Numeric Characters"),
Text(": 1")
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("Minimum Special Characters"),
Text(": 1")
],
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
Expanded(
child: Text(
"Allowed Characters:\n! @ # \$ & * ~\nPassword cannot contain spaces",
style: TextStyle(color: Colors.grey[700]),
),
),
],
),
),
// you can remove this Row if you don't want the ok button, the user can dismiss the dialog by pressing anywhere in the screen.
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FlatButton(
child: Text(
"Ok",
style: TextStyle(fontWeight: FontWeight.bold),
),
onPressed: () => Navigator.of(context).pop(),
)
],
)
],
),
),
),
),
);
showDialog(
context: context,
builder: (BuildContext context) => errorDialog);