diff --git a/lib/ui/dialog.dart b/lib/ui/dialog.dart new file mode 100644 index 0000000..930b2e8 --- /dev/null +++ b/lib/ui/dialog.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +var baseDialogTheme = DialogTheme( + backgroundColor: Colors.green[100], + elevation: 40.0, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15.0)), +); + +AlertDialog Function(BuildContext) errorDialogBuilder(String title, String message) { + return (BuildContext context) => + AlertDialog(title: Text(title), content: Text(message), actions: [ + RaisedButton( + onPressed: () => Navigator.of(context).pop(), + child: Text( + "Dismiss", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black), + ), + ) + ]); +}