MethodChannelPdfViewController class

Drives one native PDF view over its per-view method channel.

The channel name is plugins.endigo.io/pdfview_<id>, where id is the platform view id. Both bundled implementations register it.

Implemented types

Constructors

MethodChannelPdfViewController(int id, PdfViewCallbacks callbacks)
Connects to the view with the given platform view id and dispatches its events to callbacks.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Detaches from the native view and stops delivering callbacks.
override
getCurrentPage() Future<int?>
Returns the zero-based index of the page that is currently displayed.
override
getCurrentPageSize() Future<Size>
Returns the size, in points, of the page that is currently displayed.
override
getPageCount() Future<int?>
Returns the number of pages in the loaded document.
override
getPosition() Future<Offset>
Returns the current scroll offset of the document.
override
getScale() Future<double>
Returns the current zoom scale of the document.
override
getScreenshot(String fileName) Future<String>
Captures the currently visible page and writes it to fileName.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() Future<bool>
Reloads the current document and returns whether the reload succeeded.
override
setPage(int page) Future<bool?>
Jumps to the zero-based page and returns whether the jump succeeded.
override
setPosition(Offset position) Future<bool>
Scrolls the document to position and returns whether the native view accepted the new offset.
override
setScale(double scale) Future<bool>
Zooms the document to scale and returns whether the native view accepted the new scale.
override
setZoomLimits(double minZoom, double midZoom, double maxZoom) Future<bool>
Sets the minimum, middle and maximum zoom levels of the native view.
override
toString() String
A string representation of this object.
inherited
unlock(String password) Future<bool>
Reopens the current document with password and returns whether it is now unlocked.
override
updateCallbacks(PdfViewCallbacks callbacks) → void
Replaces the callbacks this controller dispatches native events to.
override
updateSettings(Map<String, dynamic> updates) Future<void>
Pushes the already-diffed updates to the native view.
override

Operators

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