part of 'index.dart'; class DocumentViewScreen extends StatefulScreen { const DocumentViewScreen({ super.key, required this.document, }); final Document document; @override State createState() => _DocumentViewScreenState(); } class _DocumentViewScreenState extends State { final PDFViewerState _viewerKey = PDFViewerState(); @override Widget build(BuildContext context) { return Stack( children: [ Padding( padding: EdgeInsets.all(10), child: FREViewerPDF( key: _viewerKey, url: 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', ), ), Positioned( bottom: 10, right: 10, child: IconButton( icon: Icon(Icons.share, color: Colors.black), color: Colors.black, onPressed: () { _viewerKey.currentState?.openBookmarkView(); // Share.share(FFLocalizations.of(context).getVariableText( // ptText: '', // enText: '', // )); }, ), ), ], ); } }