showSimpleDialog method

Future<void> showSimpleDialog(
  1. BuildContext context
)

Shows a dialog with the widget as the content.

Implementation

Future<void> showSimpleDialog(BuildContext context) async {
  return showDialog<void>(
    context: context,
    builder: (BuildContext context) {
      return AlertDialog(
        content: this,
        actions: <Widget>[
          TextButton(
            child: Text('OK'),
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
        ],
      );
    },
  );
}