NutrientViewController class abstract
A controller for a Nutrient viewer widget.
Constructors
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
-
addEventListener(
NutrientEvent event, dynamic callback(dynamic)) → Future< void> - Adds an event listener for the given event. @param event. The event to listen for.
-
addWebEventListener(
NutrientWebEvent event, dynamic callback(dynamic)) → void - This method allow you to support all events from the Nutrient Web SDK. See the NutrientWebEvent enum for a list of available events. Also check out the web events API reference for more information: https://www.nutrient.io/guides/web/events/ @param event. The event to listen for. @param callback. The callback to be called when the event is triggered.
-
convertPdfPointToViewPoint(
int pageIndex, Offset point) → Future< Offset> - Converts a point from PDF page coordinates to the page view's coordinate space.
-
convertViewPointToPdfPoint(
int pageIndex, Offset point) → Future< Offset> - Converts a point from the page view's coordinate space to PDF page coordinates.
-
enterAnnotationCreationMode(
[AnnotationTool? annotationTool]) → Future< bool?> - Enters annotation creation mode for the specified annotation tool. If no tool is specified, defaults to AnnotationTool.inkPen.
-
exitAnnotationCreationMode(
) → Future< bool?> - Exits annotation creation mode and returns to normal viewer interaction.
-
exportXfdf(
String xfdfPath) → Future< bool?> - Exports annotations to the XFDF file at the given path.
-
getVisibleRect(
int pageIndex) → Future< Rect> - Gets the visible rect of the given page. pageIndex The index of the page. This is a zero-based index. Returns a Future that completes with the visible rect of the given page.
-
getZoomScale(
int pageIndex) → Future< double> - Gets the zoom scale of the given page. pageIndex The index of the page. This is a zero-based index. Returns a Future that completes with the zoom scale of the given page.
-
importXfdf(
String xfdfPath) → Future< bool?> - Imports annotations from the XFDF file at the given path.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processAnnotations(
AnnotationType type, AnnotationProcessingMode processingMode, String destinationPath) → Future< bool?> - Processes annotations of the given type with the provided processing mode and stores the PDF at the given destination path.
-
removeEventListener(
NutrientEvent event) → Future< void> - Removes an event listener for the given event. @param event. The event to remove the listener for.
-
removeWebEventListener(
NutrientWebEvent event, dynamic callback(dynamic)) → void - Removes a web event listener for the given event. @param event. The event to remove the listener for. @param callback. The callback function that was originally added.
-
save(
) → Future< bool?> - Saves the document back to its original location if it has been changed. If there were no changes to the document, the document file will not be modified.
-
setAnnotationConfigurations(
Map< AnnotationTool, AnnotationConfiguration> configurations) → Future<bool?> - Sets the annotation preset configurations for the given annotation tools. @param configurations A map of annotation tools and their corresponding configurations. @param modifyAssociatedAnnotations Whether to modify the annotations associated with the old configuration. Only used for Android. @return True if the configurations were set successfully, false otherwise.
-
setAnnotationMenuConfiguration(
AnnotationMenuConfiguration configuration) → Future< bool?> - Sets the annotation menu configuration dynamically. This allows you to update the annotation contextual menu configuration at runtime. @param configuration The annotation menu configuration to apply. @return True if the configuration was set successfully, false otherwise.
-
toString(
) → String -
A string representation of this object.
inherited
-
zoomToRect(
int pageIndex, Rect rect) → Future< void> - Zooms to the given rect on the given page. pageIndex The index of the page. This is a zero-based index. rect The rect to zoom to. Returns a Future that completes when the zoom operation is done.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited