Added custom dialog.

master
blallo 2019-08-18 18:06:04 -03:00
parent 2a2dafcec8
commit 7e9d90b9f7
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 20 additions and 0 deletions

20
lib/ui/dialog.dart 100644
View File

@ -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: <Widget>[
RaisedButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(
"Dismiss",
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black),
),
)
]);
}