ReadOnlyDocumentMouseInteractor class

Governs mouse gesture interaction with a read-only document, such as scrolling a document with a scroll wheel and tap-and-dragging to create an expanded selection. Document gesture interactor that's designed for read-only mouse input, e.g., drag to select, and mouse wheel to scroll.

  • selects content on double, and triple taps
  • selects content on drag, after single, double, or triple tap
  • scrolls with the mouse wheel
  • automatically scrolls up or down when the user drags near a boundary

The primary difference between a read-only mouse interactor, and an editing mouse interactor, is that read-only documents don't support collapsed selections, i.e., caret display. When the user taps on a read-only document, nothing happens. The user must drag an expanded selection, or double/triple tap to select content.

Inheritance

Constructors

ReadOnlyDocumentMouseInteractor({Key? key, FocusNode? focusNode, required SuperReaderContext readerContext, ContentTapDelegate? contentTapHandler, required AutoScrollController autoScroller, required bool fillViewport, bool showDebugPaint = false, required Widget child})
const

Properties

autoScroller → AutoScrollController
Auto-scrolling delegate.
final
child Widget
The document to display within this ReadOnlyDocumentMouseInteractor.
final
contentTapHandler ContentTapDelegate?
Optional handler that responds to taps on content, e.g., opening a link when the user taps on text with a link attribution.
final
fillViewport bool
Whether the document gesture detector should fill the entire viewport even if the actual content is smaller.
final
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
readerContext SuperReaderContext
Service locator for document dependencies.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDebugPaint bool
Paints some extra visual ornamentation to help with debugging, when true.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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