flutter_pdf_share
Flutter plugin that allows you to show native share intent containing pdf file, both for IOS and Android
Usage
Add package as dependency to pubspec.yaml
dependencies:
flutter_pdf_share: ^0.0.1
Then simply pass file path (might be in temp dir or somewhere else) to share
method:
final data = await rootBundle.load('<some_asset.ext>');
final bytes = data.buffer.asUint8List();
final tempDir = await getTemporaryDirectory();
final file = File('${tempDir.path}/some_temp_name.pdf');
await file.writeAsBytes(bytes);
await FlutterPdfSharePlugin.share(file.path);