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.
Implementation
const PdfViewer({
super.key,
required this.pdfPath,
this.initialSidebarOpen = false,
this.sidebarWidth = 160,
this.thumbnailHeight = 150,
this.sidebarBackgroundColor = Colors.grey,
this.selectedPageDecoration,
});