PdfViewer constructor
const
PdfViewer({})
Creates a PdfViewer widget.
The pdfPath parameter is required and should point to a valid PDF file.
It can be either a URL (starting with http:// or https://) or an asset path.
The initialSidebarOpen parameter determines whether the thumbnail sidebar
is initially visible.
The sidebarWidth parameter sets the width of the thumbnail sidebar.
The thumbnailHeight parameter sets the height of each thumbnail in the sidebar.
The sidebarBackgroundColor parameter sets the background color of the sidebar.
The selectedPageDecoration parameter sets the decoration for the selected page thumbnail.
The showZoomHint parameter determines whether to show an animated hint
indicating that the user can pinch to zoom. Defaults to true.
Implementation
const PdfViewer({
super.key,
required this.pdfPath,
this.initialSidebarOpen = false,
this.sidebarWidth = 160,
this.thumbnailHeight = 150,
this.sidebarBackgroundColor = Colors.grey,
this.selectedPageDecoration,
this.showZoomHint = true,
});