PdfViewerController class Null safety

Controller for PdfViewer. It is derived from TransformationController and basically compatible to ValueNotifier<Matrix4>. So you can pass it to ValueListenableBuilder<Matrix4> or such to receive any view status changes.

Inheritance

Constructors

PdfViewerController()

Properties

currentPageNumber int
Get the current page number by obtaining the page that has the largest area from visiblePages.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
hasListeners bool
Whether any listeners are currently registered.
@protectedread-onlyinherited
isReady bool
Whether the controller is ready or not.
read-only
offset Offset
Current view offset (top-left corner coordinates).
read-only
pageCount int
Get total page count in the PDF document.
read-only
ready PdfViewerController?
Helper method to return null when the controller is not ready(isReady).
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
value Matrix4
The current value stored in this notifier.
read / writeinherited
viewRect Rect
Current view rectangle.
read-only
visiblePages Map<int, double>
Get list of the page numbers of the pages visible inside the viewport.
read-only
zoomRatio double
Current view zoom ratio.
read-only

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
calculatePageFitMatrix({required int pageNumber, double? padding}) Matrix4?
Calculate the matrix that corresponding to the page position.
calculatePageMatrix({required int pageNumber, double? padding, double x = 0.5, double y = 0.5, PdfViewerAnchor anchor = PdfViewerAnchor.center, double? zoomRatio}) Matrix4?
Calculate the matrix that corresponding to the page of specified offset (x, y) and specified zoomRatio.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
@mustCallSuperinherited
getPageRect(int pageNumber) Rect?
Get page location. If the page does not exist in the layout, it returns null.
goTo({Matrix4? destination, Duration duration = const Duration(milliseconds: 200)}) Future<void>
Go to the destination specified by the matrix.
goToPage({required int pageNumber, double? padding, Duration duration = const Duration(milliseconds: 500)}) Future<void>
Go to the specified page.
goToPointInPage({required int pageNumber, double? padding, double x = 0.5, double y = 0.5, PdfViewerAnchor anchor = PdfViewerAnchor.center, double? zoomRatio, Duration duration = const Duration(milliseconds: 500)}) Future<void>
Go to specific point in page.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setZoomRatio({required double zoomRatio, Offset? center, Duration duration = const Duration(milliseconds: 200)}) Future<void>
Set zoom ratio.
toScene(Offset viewportPoint) Offset
Return the scene point at the given viewport point.
inherited
toString() String
A string representation of this object.
inherited
zoomMatrix(double zoomRatio, {Offset? center}) Matrix4
Calculate the matrix that changes zoom ratio.

Operators

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