showSimpleAlertDialog static method

void showSimpleAlertDialog(
  1. BuildContext context,
  2. String title,
  3. String message,
  4. String buttonText,
  5. Function onPressed,
)

Implementation

static void showSimpleAlertDialog(
  BuildContext context,
  String title,
  String message,
  String buttonText,
  Function onPressed,
) {
  showDialog(
    context: context,
    builder: (BuildContext context) {
      return AlertDialog(
        title: new Text(title),
        content: new Text(message),
        actions: [
          // submitButton(
          //   buttonText,
          //   onPressed(),
          // ),
          new TextButton(
            onPressed: () {
              return onPressed();
            },
            child: new Text(buttonText),
          )
        ],
      );
    },
  );
}