new msgbox to avoid crash

This commit is contained in:
open-trade
2020-11-29 01:36:10 +08:00
parent d89ad33b98
commit 0797334e35
4 changed files with 55 additions and 94 deletions

View File

@@ -99,8 +99,8 @@ class _RemotePageState extends State<RemotePage> {
}
}
Future<Null> showMsgBox(String type, String title, String text) async {
await msgbox(type, title, text, context);
void showMsgBox(String type, String title, String text) {
msgbox(type, title, text, context);
final hasRetry = type == "error" &&
title == "Connection Error" &&
text.toLowerCase().indexOf("offline") < 0 &&
@@ -179,7 +179,7 @@ class _RemotePageState extends State<RemotePage> {
onPressed: () {
setState(() => _showBar = !_showBar);
}),
bottomNavigationBar: _showBar
bottomNavigationBar: _showBar && FFI.ffiModel.pi.displays != null
? BottomAppBar(
elevation: 10,
color: MyTheme.accent,