Is it possible to download and open a PDF in a Flutter web app?

For my windows build I am downloading and opening a PDF file like this:

await dio.download(
    'https://someurl.com/downloadfile.pdf',
    '/save/file/here.pdf',
);

await OpenFile.open('/save/file/here.pdf', type: 'application/pdf');

Is it possible to do that when I publish to the web? I get an error that says:

The download method is not available in the Web environment.

I assume there’s some way to download a file to the browser downloads area. But is it possible to then open it?

Did you try with this package?

Works for me.

Edit: It opens the file in your app - don’t know if you want to achieve that.