showErrorDialog function
Implementation
Future<Null> showErrorDialog(BuildContext context, String message,
{String title}) {
return showDialog<Null>(
context: context,
barrierDismissible: false, // user must tap button!
builder: (BuildContext context) => new AlertDialog(
title: title != null ? new Text(title) : null,
content: new SingleChildScrollView(
child: new ListBody(
children: <Widget>[
new Text(message ?? FFULocalizations.of(context).errorOccurred),
],
),
),
actions: <Widget>[
new FlatButton(
child: new Row(
children: <Widget>[
new Text(FFULocalizations.of(context).cancelButtonLabel),
],
),
onPressed: () {
Navigator.of(context).pop();
},
),
],
),
);
}