CPDFReaderWidgetController class

PDF Reader Widget Controller

Examples:

Scaffold(
        resizeToAvoidBottomInset: false,
        appBar: AppBar(title: const Text('CPDFReaderWidget Example')),
        body: CPDFReaderWidget(
          document: widget.documentPath,
          configuration: CPDFConfiguration(),
          onCreated: (controller) {
            setState(() {
              _controller = controller;
            });
          },
        ));

Constructors

CPDFReaderWidgetController(int id)

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

getCurrentPageIndex() Future<int>
get current page index
getScale() Future<double>
Get the page scale
hasChange() Future<bool>
Check the document for modifications
isContinueMode() Future<bool>
Whether it is continuous scroll mode.
isCoverPageMode() Future<bool>
Whether it is cover page mode.
isCropMode() Future<bool>
Whether it is crop mode.
isDoublePageMode() Future<bool>
Whether it is double page mode. is_ example:
isFormFieldHighlight() Future<bool>
Whether to display highlight Form Field.
isLinkHighlight() Future<bool>
Whether to display highlight Link.
isPageInScreen(int pageIndex) Future<bool>
Gets whether the specified pageIndex is displayed on the screen
isVerticalMode() Future<bool>
Whether it is vertical scroll mode.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save() Future<bool>
Save document Return value: true if the save is successful, false if the save fails.
setCanScale(bool canScale) Future<void>
Whether allow to scale. Default : true
setContinueMode(bool isContinueMode) Future<void>
Sets whether it is continuous scroll mode.
setCoverPageMode(bool coverPageMode) Future<void>
Sets whether it is cover page mode.
setCropMode(bool isCropMode) Future<void>
Sets whether it is crop mode.
setDisplayPageIndex(int pageIndex, {bool animated = true}) Future<void>
Jump to the index page.
setDoublePageMode(bool isDoublePageMode) Future<void>
Sets whether it is double page mode.
setFixedScroll(bool isFixedScroll) Future<void>
Sets whether to fix the position of the non-swipe direction when zooming in for reading.
setFormFieldHighlight(bool isFormFieldHighlight) Future<void>
Sets background color of reader. The color of each document space will be set to 75% of color transparency
setLinkHighlight(bool isLinkHighlight) Future<void>
Sets whether to display highlight Link.
setMargins(CPDFEdgeInsets edgeInsets) Future<void>
Set document page spacing
setPageSameWidth(bool isSame) Future<void>
In the single page mode, set whether all pages keep the same width and the original page keeps the same width as readerView
setScale(double scale) Future<void>
Set the page scale Value Range: 1.0~5.0
setVerticalMode(bool isVerticalMode) Future<void>
Sets whether it is vertical scroll mode.
toString() String
A string representation of this object.
inherited

Operators

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