NativePdfView constructor
const
NativePdfView({
- Key? key,
- String? filePath,
- String? url,
- Widget? placeholder,
- Widget errorBuilder(
- String error
- String? searchQuery,
- int currentMatchIndex = 0,
- dynamic onSearchResultsChanged()?,
- String? annotationMode,
- int? annotationColor,
- double? annotationStrokeWidth,
- VoidCallback? onAnnotationClear,
- bool enableTextSearch = true,
- bool enablePanAndZoom = true,
- bool enableAnnotations = true,
- String renderQuality = 'high',
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,
this.renderQuality = 'high', // Default to high quality
}) : assert(filePath != null || url != null,
'Either filePath or url must be provided');