openPdf static method

Future<void> openPdf({
  1. required BuildContext context,
  2. String? filePath,
  3. String? url,
  4. String? assetPath,
  5. PDFViewSource source = PDFViewSource.file,
  6. String? title,
  7. bool enableNavigation = true,
  8. bool enableTextSelection = true,
  9. IconData? fabIcon,
  10. VoidCallback? onFabPressed,
})

Implementation

static Future<void> openPdf({
  required BuildContext context,
  String? filePath,
  String? url,
  String? assetPath,
  PDFViewSource source = PDFViewSource.file,
  String? title,
  bool enableNavigation = true,
  bool enableTextSelection = true,
  IconData? fabIcon,
  VoidCallback? onFabPressed,
}) async {
  await Navigator.of(context).push(
    MaterialPageRoute(
      builder: (context) => BoltPDFViewer(
        filePath: filePath,
        url: url,
        assetPath: assetPath,
        source: source,
        title: title,
        enableNavigation: enableNavigation,
        enableTextSelection: enableTextSelection,
        fabIcon: fabIcon,
        onFabPressed: onFabPressed,
      ),
    ),
  );
}