diff --git a/lib/src/screens/backup/backup_page.dart b/lib/src/screens/backup/backup_page.dart index cab867bf5..59abff990 100644 --- a/lib/src/screens/backup/backup_page.dart +++ b/lib/src/screens/backup/backup_page.dart @@ -172,10 +172,15 @@ class BackupPage extends BasePage { Future _saveFile(BackupExportFile backup) async { String? outputFile = await FilePicker.platform - .saveFile(dialogTitle: 'Save Your File to desired location', fileName: backup.name); + .saveFile( + dialogTitle: 'Save Your File to desired location', + fileName: backup.name, + lockParentWindow: true); + + if (outputFile == null) return; try { - await backup.file.copy(outputFile!); + await backup.file.copy(outputFile); } catch (exception, stackTrace) { await ExceptionHandler.onError(FlutterErrorDetails( exception: exception, diff --git a/lib/src/screens/seed/wallet_seed_page.dart b/lib/src/screens/seed/wallet_seed_page.dart index f0794f98a..97da1e027 100644 --- a/lib/src/screens/seed/wallet_seed_page.dart +++ b/lib/src/screens/seed/wallet_seed_page.dart @@ -158,6 +158,7 @@ class WalletSeedPage extends BasePage { final path = await FilePicker.platform.saveFile( dialogTitle: "Save seed as", fileName: "${walletSeedViewModel.name}-seed.txt", + lockParentWindow: true, ); if(path != null) { final file = File(path); diff --git a/lib/src/screens/settings/mweb_logs_page.dart b/lib/src/screens/settings/mweb_logs_page.dart index 8310673c5..6fd6ead3e 100644 --- a/lib/src/screens/settings/mweb_logs_page.dart +++ b/lib/src/screens/settings/mweb_logs_page.dart @@ -104,12 +104,17 @@ class MwebLogsPage extends BasePage { Future _saveFile() async { String? outputFile = await FilePicker.platform - .saveFile(dialogTitle: 'Save Your File to desired location', fileName: "debug.log"); + .saveFile( + dialogTitle: 'Save Your File to desired location', + fileName: "debug.log", + lockParentWindow: true); + + if (outputFile == null) return; try { final filePath = (await getApplicationSupportDirectory()).path + "/debug.log"; File debugLogFile = File(filePath); - await debugLogFile.copy(outputFile!); + await debugLogFile.copy(outputFile); } catch (exception, stackTrace) { ExceptionHandler.onError(FlutterErrorDetails( exception: exception, diff --git a/lib/src/screens/settings/silent_payments_logs_page.dart b/lib/src/screens/settings/silent_payments_logs_page.dart index baea684b6..102755f4e 100644 --- a/lib/src/screens/settings/silent_payments_logs_page.dart +++ b/lib/src/screens/settings/silent_payments_logs_page.dart @@ -106,12 +106,17 @@ class SilentPaymentsLogPage extends BasePage { Future _saveFile() async { String? outputFile = await FilePicker.platform - .saveFile(dialogTitle: 'Save Your File to desired location', fileName: "debug.log"); + .saveFile( + dialogTitle: 'Save Your File to desired location', + fileName: "debug.log", + lockParentWindow: true); + + if (outputFile == null) return; try { final filePath = (await getApplicationSupportDirectory()).path + "/debug.log"; File debugLogFile = File(filePath); - await debugLogFile.copy(outputFile!); + await debugLogFile.copy(outputFile); } catch (exception, stackTrace) { ExceptionHandler.onError(FlutterErrorDetails( exception: exception,