diff --git a/lib/ph/ui/pages/past_ph_selection_page/ph_list.dart b/lib/ph/ui/pages/past_ph_selection_page/ph_list.dart index 8b88a1ab3..e9dbe1c7d 100644 --- a/lib/ph/ui/pages/past_ph_selection_page/ph_list.dart +++ b/lib/ph/ui/pages/past_ph_selection_page/ph_list.dart @@ -56,12 +56,19 @@ class PhList extends HookConsumerWidget { dataBuilder: (context, pdf) => PhCard( ph: ph, onDownload: () async { - final path = await FileSaver.instance.saveAs( - name: ph.name, - bytes: pdf.last, - ext: "pdf", - mimeType: MimeType.pdf, - ); // Not yet possible to save directly the file to Download folder + final path = kIsWeb + ? await FileSaver.instance.saveFile( + name: ph.name, + bytes: pdf.last, + ext: "pdf", + mimeType: MimeType.pdf, + ) + : await FileSaver.instance.saveAs( + name: ph.name, + bytes: pdf.last, + ext: "pdf", + mimeType: MimeType.pdf, + ); if (path != null) { displayPhToastWithContext( TypeMsg.msg,