Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ResultScreen - Download
FlatButton(
onPressed: () {
pdfGenerator(name);
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text('$name.pdf downloaded'),
action: SnackBarAction(
label: 'View',
onPressed: () async {
String downloadPath =
await getApplicationDocumentsDirectoryPath();
Navigator.pushNamed(context, '/viewer',
arguments: {
'view': '$downloadPath/$name.pdf'
});
},
),
),
);
},
child: Icon(Icons.file_download),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.