BoltPDFViewer constructor
const
BoltPDFViewer({
- Key? key,
- String? filePath,
- String? url,
- String? assetPath,
- PDFViewSource source = PDFViewSource.file,
- bool showPageCounter = true,
- bool showToolbar = true,
- bool enableTextSelection = true,
- String? password,
- int defaultPage = 0,
- Color? loadingColor,
- String? title,
- List<
Widget> ? toolbarActions, - Widget? loadingWidget,
- Widget? errorWidget,
- Color? backgroundColor,
- dynamic onViewCreated(
- PDFViewController
- dynamic onPageChanged()?,
- dynamic onError(
- dynamic
- bool isModal = false,
- IconData? fabIcon,
- VoidCallback? onFabPressed,
Implementation
const BoltPDFViewer({
super.key,
this.filePath,
this.url,
this.assetPath,
this.source = PDFViewSource.file,
this.enableNavigation = true,
this.showPageCounter = true,
this.showToolbar = true,
this.enableTextSelection = true,
this.password,
this.defaultPage = 0,
this.loadingColor,
this.title,
this.toolbarActions,
this.loadingWidget,
this.errorWidget,
this.backgroundColor,
this.onViewCreated,
this.onPageChanged,
this.onError,
this.isModal = false,
this.fabIcon,
this.onFabPressed,
}) : assert(
(source == PDFViewSource.file && filePath != null) ||
(source == PDFViewSource.network && url != null) ||
(source == PDFViewSource.asset && assetPath != null),
'Must provide a filePath for file source, a url for network source, or an assetPath for asset source',
);