NativePdfView constructor

const NativePdfView({
  1. Key? key,
  2. String? filePath,
  3. String? url,
  4. Widget? placeholder,
  5. Widget errorBuilder(
    1. String error
    )?,
  6. String? searchQuery,
  7. int currentMatchIndex = 0,
  8. dynamic onSearchResultsChanged(
    1. int totalMatches,
    2. String? error
    )?,
  9. String? annotationMode,
  10. int? annotationColor,
  11. double? annotationStrokeWidth,
  12. VoidCallback? onAnnotationClear,
  13. bool enableTextSearch = true,
  14. bool enablePanAndZoom = true,
  15. bool enableAnnotations = true,
})

Implementation

const NativePdfView({
  super.key,
  this.filePath,
  this.url,
  this.placeholder,
  this.errorBuilder,
  this.searchQuery,
  this.currentMatchIndex = 0,
  this.onSearchResultsChanged,
  this.annotationMode,
  this.annotationColor,
  this.annotationStrokeWidth,
  this.onAnnotationClear,
  this.enableTextSearch = true,
  this.enablePanAndZoom = true,
  this.enableAnnotations = true,
}) : assert(filePath != null || url != null,
          'Either filePath or url must be provided');