Skip to content

Instantly share code, notes, and snippets.

@Classy-Bear
Created January 10, 2020 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Classy-Bear/852f5b949a5662d272561f19dac00c8f to your computer and use it in GitHub Desktop.
Save Classy-Bear/852f5b949a5662d272561f19dac00c8f to your computer and use it in GitHub Desktop.
String assetPDFPath = "";
String urlPDFPath = "";
@override
void initState() {
super.initState();
getFileFromAsset("assets/mypdf.pdf").then((f) {
setState(() {
assetPDFPath = f.path;
print(assetPDFPath);
});
});
getFileFromUrl("http://www.pdf995.com/samples/pdf.pdf").then((f) {
setState(() {
urlPDFPath = f.path;
print(urlPDFPath);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment