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 664cc2168..8b88a1ab3 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,15 +56,18 @@ class PhList extends HookConsumerWidget { dataBuilder: (context, pdf) => PhCard( ph: ph, onDownload: () async { - await FileSaver.instance.saveFile( + final path = await FileSaver.instance.saveAs( name: ph.name, bytes: pdf.last, ext: "pdf", - ); - displayPhToastWithContext( - TypeMsg.msg, - PhTextConstants.succesDowloading, - ); + mimeType: MimeType.pdf, + ); // Not yet possible to save directly the file to Download folder + if (path != null) { + displayPhToastWithContext( + TypeMsg.msg, + PhTextConstants.succesDowloading, + ); + } }, ), );