-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i download the file #258
Comments
It's useful to look at the import 'package:web/web.dart' as web;
...
var anchorElement = web.HTMLAnchorElement()
..href = url
..setAttribute('download', '')
..click(); |
For Android build it's failing how we can use this as web and don't fail the android build |
I'll need a bit more information, but if you're compiling to native, |
with import 'dart:html' as html;
was using this
html.AnchorElement(href: url)
// Set the download attribute to file name.
..setAttribute("download", "")
// Trigger a click event on the anchor element to initiate the download.
..click();
and it's was working absolutely fine
url: https://pdfobject.com/pdf/sample.pdf
how it'll work with web package
The text was updated successfully, but these errors were encountered: