fix: material dark mode text

This commit is contained in:
Rongjian Zhang
2020-02-01 17:18:21 +08:00
parent 559d6756e8
commit a4284d00fb
4 changed files with 62 additions and 25 deletions

View File

@@ -224,6 +224,7 @@ class ThemeModel with ChangeNotifier {
Future<bool> showConfirm(BuildContext context, Widget content) {
switch (theme) {
case AppThemeType.cupertino:
default:
return showCupertinoDialog(
context: context,
builder: (context) {
@@ -247,29 +248,29 @@ class ThemeModel with ChangeNotifier {
);
},
);
default:
return showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
content: content,
actions: <Widget>[
FlatButton(
child: const Text('CANCEL'),
onPressed: () {
Navigator.pop(context, false);
},
),
FlatButton(
child: const Text('OK'),
onPressed: () {
Navigator.pop(context, true);
},
)
],
);
},
);
// default:
// return showDialog(
// context: context,
// builder: (BuildContext context) {
// return AlertDialog(
// content: content,
// actions: <Widget>[
// FlatButton(
// child: const Text('CANCEL'),
// onPressed: () {
// Navigator.pop(context, false);
// },
// ),
// FlatButton(
// child: const Text('OK'),
// onPressed: () {
// Navigator.pop(context, true);
// },
// )
// ],
// );
// },
// );
}
}