AlhPdfView class

Showing PDF with given filePath or bytes.

Inheritance

Constructors

AlhPdfView({String? filePath, Uint8List? bytes, PDFViewCreatedCallback? onViewCreated, RenderCallback? onRender, PageChangedCallback? onPageChanged, ErrorCallback? onError, PageErrorCallback? onPageError, ZoomChangedCallback? onZoomChanged, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers, LinkHandleCallback? onLinkHandle, FitPolicy fitPolicy = FitPolicy.both, bool fitEachPage = true, bool enableSwipe = true, bool swipeHorizontal = false, String password = '', bool nightMode = false, bool autoSpacing = true, bool pageFling = true, bool showScrollbar = true, bool pageSnap = true, int defaultPage = 0, Color backgroundColor = Colors.transparent, double defaultZoomFactor = 1.0, bool enableDoubleTap = true, double minZoom = 0.5, double maxZoom = 4.0, bool enableDefaultScrollHandle = false, int spacing = 0, Key? key})
const

Properties

autoSpacing bool
If true, spacing will be added to fit each page on its own on the screen.
final
backgroundColor Color
Setting backgroundColor of remaining space around the pdf view.
final
bytes Uint8List?
Loading the pdf with the given bytes.
final
defaultPage int
Describes which page should be shown at first.
final
defaultZoomFactor double
Defines how much the displayed PDF page should zoomed when rendered.
final
enableDefaultScrollHandle bool
When enabled, you have an extra button to scroll faster.
final
enableDoubleTap bool
When double tapping, the zoom of the page changes.
final
enableSwipe bool
The current page will be changed when swiping.
final
filePath String?
Loading the file with the given filePath.
final
fitEachPage bool
Each page of the PDF will fit inside the given space.
final
fitPolicy FitPolicy
Defines how the PDF should fit inside the widget.
final
gestureRecognizers Set<Factory<OneSequenceGestureRecognizer>>?
Which gestures should be consumed by the pdf view.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxZoom double
Max zoom value that the user can reach.
final
minZoom double
Min zoom value that the user can reach.
final
nightMode bool
Inverting colors of pages to have the look of a dark mode.
final
onError ErrorCallback?
When there are errors happening, this methods returns a message.
final
onLinkHandle LinkHandleCallback?
Called when tapped a link in PDF.
final
onPageChanged PageChangedCallback?
When changing the page, this method will be called with the new page.
final
onPageError PageErrorCallback?
Called when there are specific errors on a page.
final
onRender RenderCallback?
Callback once the PDF page was loaded.
final
onViewCreated PDFViewCreatedCallback?
If not null invoked once the native view is created.
final
onZoomChanged ZoomChangedCallback?
Called when changing the zoom.
final
pageFling bool
Making a fling change.
final
pageSnap bool
Snap pages to screen boundaries when changing the current page.
final
password String
Unlocks PDF page with given password.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showScrollbar bool
Responsible to show the scrolling indicator (ScrollBar) inside the pdf view.
final
spacing int
Spacing between pdf pages.
final
swipeHorizontal bool
If true, all pages are displayed in horizontal direction.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _AlhPdfViewState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited