materialDialog method

Future<void> materialDialog (
  1. {@required BuildContext context,
  2. @required String title,
  3. @required String msg,
  4. List<Widget> actions,
  5. String animations,
  6. ShapeBorder dialogShape: dialogShape,
  7. TextStyle titleStyle: titleStyle,
  8. TextStyle msgStyle,
  9. Color color: bcgColor}
)

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 actionsWidgets 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,
            ));
      });
}