49 lines
1.2 KiB
Dart
49 lines
1.2 KiB
Dart
part of 'index.dart';
|
|
|
|
class DocumentViewScreen extends StatefulScreen {
|
|
const DocumentViewScreen({
|
|
super.key,
|
|
required this.document,
|
|
});
|
|
|
|
final Document document;
|
|
|
|
@override
|
|
State<DocumentViewScreen> createState() => _DocumentViewScreenState();
|
|
}
|
|
|
|
class _DocumentViewScreenState extends State<DocumentViewScreen> {
|
|
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: '',
|
|
// ));
|
|
},
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|