promptAuthError function

Future<void> promptAuthError (
  1. BuildContext context,
  2. String title,
  3. String body,
  4. String key
)

Implementation

Future<void> promptAuthError(
    BuildContext context, String title, String body, String key) async {
  await showDialog(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          title: Text(title),
          content: Text(body),
          actions: <Widget>[
            FlatButton(
              key: Key(key),
              child: Text("Close"),
              onPressed: () {
                Navigator.of(context).pop();
              },
            ),
          ],
        );
      });
}