PdfControllerPinch class

Pages control

Inheritance

Constructors

PdfControllerPinch({required Future<PdfDocument> document, int initialPage = 1, double viewportFraction = 1.0})

Properties

currentPageNumber int
Get the current page number by obtaining the page that has the largest area from visiblePages.
no setter
document Future<PdfDocument>
Document future for showing in PdfViewPinch
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initialPage int
The page to show when first creating the PdfViewPinch.
getter/setter pair
page int
no setter
pageCount int
Get total page count in the PDF document.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Matrix4
The current value stored in this notifier.
getter/setter pairinherited
viewportFraction double
The fraction of the viewport that each page should occupy.
final
viewRect Rect
Current view rectangle. If the controller is not ready(PdfViewPinch), the property throws an exception.
no setter
visiblePages Map<int, double>
Get list of the page numbers of the pages visible inside the viewport. The map keys are the page numbers. And each page number is associated to the page area (width x height) exposed to the viewport;
no setter
zoomRatio double
Current view zoom ratio.
no setter

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.
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).
override
getPageRect(int pageNumber) Rect?
Get page location. If the page is out of view,
goTo({Matrix4? destination, Duration duration = const Duration(milliseconds: 200), Curve curve = Curves.easeInOut}) Future<void>
Go to the destination specified by the matrix. To go to a specific page, use goToPage method or use calculatePageFitMatrix method to calculate the page location matrix. If destination is null, the method does nothing.
goToPage({required int pageNumber, double? padding, Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.easeInOut}) Future<void>
Go to the specified page.
loadDocument(Future<PdfDocument> documentFuture, {int initialPage = 1}) Future<void>
Load document
nextPage({required Duration duration, required Curve curve}) Future<void>
Animates the controlled PdfViewPinch to the next page.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
previousPage({required Duration duration, required Curve curve}) Future<void>
Animates the controlled PdfViewPinch to the previous page.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toScene(Offset viewportPoint) Offset
Return the scene point at the given viewport point.
inherited
toString() String
A string representation of this object.
inherited

Operators

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