maxZoomLevel property
Represents the maximum allowed zoom level.
Defaults to 3.0.
If the zoomLevel
value is set higher than the maximum zoom level, then it will be restricted to the maximum zoom level.
This example demonstrates how to set the maximum allowed zoom level in the SfPdfViewer.
class MyAppState extends State<MyApp> {
final GlobalKey<SfPdfViewerState> _pdfViewerKey = GlobalKey();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Syncfusion Flutter PDF Viewer'),
),
body: SfPdfViewer.network(
'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf',
key: _pdfViewerKey,
maxZoomLevel: 6,
),
);
}
}
Implementation
final double maxZoomLevel;