dialog static method

Future<void> dialog(
  1. BuildContext context,
  2. String title,
  3. String message
)

Implementation

static Future<void> dialog(
  BuildContext context,
  String title,
  String message,
) async {
  await showDialog(
    context: context,
    builder: (BuildContext context) {
      return AlertDialog(
        backgroundColor: GlThemeColors.get(context).background,
        title: Text(title),
        content: Text(message),
        actions: <Widget>[
          TextButton(
            onPressed: () {
              Navigator.of(context).pop();
            },
            child: Text(
              'OK',
              style: TextStyle(color: GlThemeColors.get(context).primary),
            ),
          ),
        ],
      );
    },
  );
}