materialDialog method
Displays normal Material dialog above the current contents of the app
context
your parent widget context
color
dialog background color
title
your dialog title
titleStyle
your dialog title style
msg
your dialog description message
msgStyle
your dialog description style
actions
Widgets to display a row of buttons after the msg
widget.
Implementation
/// [title] your dialog title
/// [titleStyle] your dialog title style
/// [msg] your dialog description message
/// [msgStyle] your dialog description style
/// [actions]Widgets to display a row of buttons after the [msg] widget.
static Future<void> materialDialog({
@required BuildContext context,
@required String title,
@required String msg,
List<Widget> actions,
String animations,
ShapeBorder dialogShape = dialogShape,
TextStyle titleStyle = titleStyle,
TextStyle msgStyle,
Color color = bcgColor,
}) async {
assert(context != null);
assert(title != null);
assert(msg != null);
await showDialog<String>(
context: context,
builder: (_) {
return Dialog(
backgroundColor: color,
shape: dialogShape,
child: DialogWidget(
title: title,
msg: msg,
actions: actions,
animation: animations,
titleStyle: titleStyle,
msgStyle: msgStyle,
color: color,
));
});
}