diff --git a/lib/ui/views/app_selector/app_selector_viewmodel.dart b/lib/ui/views/app_selector/app_selector_viewmodel.dart index 9075b2a3..e3691bba 100644 --- a/lib/ui/views/app_selector/app_selector_viewmodel.dart +++ b/lib/ui/views/app_selector/app_selector_viewmodel.dart @@ -90,10 +90,14 @@ class AppSelectorViewModel extends BaseViewModel { await DeviceApps.getApp(packageName, true) as ApplicationWithIcon?; if (app != null) { if (await checkSplitApk(packageName) && !isRooted) { - return showSelectFromStorageDialog(context); + if (context.mounted) { + return showSelectFromStorageDialog(context); + } } else if (!await checkSplitApk(packageName) || isRooted) { selectApp(app); - Navigator.pop(context); + if (context.mounted) { + Navigator.pop(context); + } } } }