minor fixes [skip ci]
Omar committed
Jun 23, 2026 at 17:39 UTC
cda9d09ead46a40b434b0c0b88740fe9db945167
2 files changed
+7
-3
lib/src/screens/backup/backup_page.dart
+6
-2
@@ -154,8 +154,12 @@ class BackupPage extends BasePage {
154
leftButtonText: S.of(context).share,
155
actionRightButton: () async {
156
await backupViewModelBase.saveToDownload(backup.name, backup.file);
157
- Navigator.of(dialogContext).pop();
158
- await showBar<void>(context, S.of(context).file_saved);
157
+ if (dialogContext.mounted && Navigator.canPop(dialogContext)) {
158
+ Navigator.of(dialogContext).pop();
159
+ }
160
+ if (context.mounted && Navigator.canPop(context)) {
161
+ await showBar<void>(context, S.of(context).file_saved);
162
+ }
163
},
164
actionLeftButton: () async {
165
Navigator.of(dialogContext).pop();
lib/view_model/hardware_wallet/ledger_view_model.dart
+1
-1
@@ -161,7 +161,7 @@ abstract class LedgerViewModelBase extends HardwareWalletViewModel with Store {
161
allowChangeWallet: true,
162
isReconnect: true,
163
onConnectDevice: (context, ledgerVM) async {
164
- if (context.mounted) {
164
+ if (context.mounted && Navigator.of(context).canPop()) {
165
Navigator.of(context).pop();
166
}
167
},