Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HomeScreen - Share FAB
FloatingActionButton(
heroTag: 'Share',
onPressed: () async {
final names = homeProvider
.xlsxFileTables[homeProvider.xlsxFileSelectedTable]
.rows
.map((name) => name
.toString()
.substring(1, name.toString().length - 1));
names.forEach((name) => pdfGenerator(name));
final String downloadPath =
await getApplicationDocumentsDirectoryPath();
final files = names
.map((name) => File('$downloadPath/$name.pdf').path);
await ShareExtend.shareMultiple([
...files,
], 'file');
},
child: Icon(Icons.share),
)
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.