Added custom dialog.
This commit is contained in:
parent
2a2dafcec8
commit
7e9d90b9f7
20
lib/ui/dialog.dart
Normal file
20
lib/ui/dialog.dart
Normal 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),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user