safer navigator.pop

This commit is contained in:
rustdesk committed 2022-01-29 15:55:00 +08:00
1 parent b24c997a20
commit eebb7e1f4c
6 files changed
+5 -11

No files matched your search

+2
View File
@@ -32,6 +32,7 @@ void Function() loadingCancelCallback;
void showLoading(String text, BuildContext context) {
if (_hasDialog && context != null) {
Navigator.pop(context);
_hasDialog = false;
}
dismissLoading();
if (isAndroid) {
@@ -122,6 +123,7 @@ void msgbox(String type, String title, String text, BuildContext context,
dismissLoading();
if (_hasDialog) {
Navigator.pop(context);
_hasDialog = false;
}
final buttons = [
Expanded(child: Container()),