@@ -159,7 +159,7 @@ class _RestoreBackupDialogState extends ConsumerState<_RestoreBackupDialog> {
159159 Future <void > importBackup () async {
160160 Result result = const ResultCancelled ();
161161 try {
162- FilePickerResult ? filePickerResult = await showWaitingOverlay (
162+ List < PlatformFile > ? files = await showWaitingOverlay (
163163 context,
164164 future: (() async {
165165 Directory directory = await BackupPath .getBackupsDirectory (create: true );
@@ -168,11 +168,12 @@ class _RestoreBackupDialogState extends ConsumerState<_RestoreBackupDialog> {
168168 initialDirectory: directory.path,
169169 type: FileType .custom,
170170 allowedExtensions: ['bak' ],
171- lockParentWindow: true ,
171+ windowsOptions: const WindowsOptions (lockParentWindow: true ),
172+ linuxOptions: const LinuxOptions (lockParentWindow: true ),
172173 );
173174 })(),
174175 );
175- String ? backupFilePath = filePickerResult ? . files.firstOrNull? .path;
176+ String ? backupFilePath = files? .firstOrNull? .path;
176177 if (backupFilePath == null || ! mounted) {
177178 return ;
178179 }
@@ -238,7 +239,7 @@ class _RestoreBackupDialogState extends ConsumerState<_RestoreBackupDialog> {
238239 Future <void > exportBackup (BackupPath backup) async {
239240 Result result = const ResultCancelled ();
240241 try {
241- String ? outputFilePath = await showWaitingOverlay (
242+ Uri ? outputFilePath = await showWaitingOverlay (
242243 context,
243244 future: (() async {
244245 Directory directory = await BackupPath .getBackupsDirectory (create: true );
@@ -249,14 +250,15 @@ class _RestoreBackupDialogState extends ConsumerState<_RestoreBackupDialog> {
249250 bytes: Uint8List (0 ),
250251 type: FileType .custom,
251252 allowedExtensions: ['bak' ],
252- lockParentWindow: true ,
253+ windowsOptions: const WindowsOptions (lockParentWindow: true ),
254+ linuxOptions: const LinuxOptions (lockParentWindow: true ),
253255 );
254256 })(),
255257 );
256258 if (outputFilePath == null ) {
257259 return ;
258260 }
259- backup.file.copySync (outputFilePath);
261+ backup.file.copySync (outputFilePath. toString () );
260262 result = const ResultSuccess ();
261263 } catch (ex, stackTrace) {
262264 result = ResultError (exception: ex, stackTrace: stackTrace);
0 commit comments