has crash when popup msgbox when there is keyboard or some other

condition
This commit is contained in:
open-trade
2020-11-29 00:13:55 +08:00
parent 722a382ce2
commit d89ad33b98
11 changed files with 70 additions and 27 deletions

View File

@@ -64,12 +64,13 @@ Future<T> showAlertDialog<T>(BuildContext context, BuildAlertDailog build,
return res;
}
void msgbox(String type, String title, String text, BuildContext context,
[bool hasCancel]) {
Future<T> msgbox<T>(
String type, String title, String text, BuildContext context,
[bool hasCancel]) async {
if (hasCancel == null) {
hasCancel = type != 'error';
}
showAlertDialog(
return await showAlertDialog<T>(
context,
(_) => Tuple3(Text(title), Text(text), [
hasCancel