SuperReader class

Inheritance

Constructors

SuperReader({Key? key, FocusNode? focusNode, bool autofocus = false, String? tapRegionGroupId, required Document document, GlobalKey<State<StatefulWidget>>? documentLayoutKey, ValueNotifier<DocumentSelection?>? selection, SelectionLayerLinks? selectionLayerLinks, ScrollController? scrollController, Stylesheet? stylesheet, List<SingleColumnLayoutStylePhase> customStylePhases = const [], List<SuperReaderDocumentLayerBuilder> documentUnderlayBuilders = const [], List<SuperReaderDocumentLayerBuilder> documentOverlayBuilders = defaultSuperReaderDocumentOverlayBuilders, List<ComponentBuilder>? componentBuilders, List<ReadOnlyDocumentKeyboardAction>? keyboardActions, SelectionStyles? selectionStyle, DocumentGestureMode? gestureMode, SuperReaderContentTapDelegateFactory? contentTapDelegateFactory = superReaderLaunchLinkTapHandlerFactory, MagnifierAndToolbarController? overlayController, Color? androidHandleColor, WidgetBuilder? androidToolbarBuilder, Color? iOSHandleColor, WidgetBuilder? iOSToolbarBuilder, CustomClipper<Rect> createOverlayControlsClipper(BuildContext overlayContext)?, DebugPaintConfig debugPaint = const DebugPaintConfig(), bool shrinkWrap = false})

Properties

androidHandleColor Color?
Color of the text selection drag handles on Android.
final
androidToolbarBuilder WidgetBuilder?
Builder that creates a floating toolbar when running on Android.
final
autofocus bool
Whether or not the SuperReader should autofocus.
final
componentBuilders List<ComponentBuilder>
Priority list of widget factories that create instances of each visual component displayed in the document layout, e.g., paragraph component, image component, horizontal rule component, etc.
final
contentTapDelegateFactory SuperReaderContentTapDelegateFactory?
Factory that creates a ContentTapDelegate, which is given an opportunity to respond to taps on content before the editor, itself.
final
createOverlayControlsClipper CustomClipper<Rect> Function(BuildContext overlayContext)?
Creates a clipper that applies to overlay controls, like drag handles, magnifiers, and popover toolbars, preventing the overlay controls from appearing outside the given clipping region.
final
customStylePhases List<SingleColumnLayoutStylePhase>
Custom style phases that are added to the standard style phases.
final
debugPaint DebugPaintConfig
Paints some extra visual ornamentation to help with debugging.
final
document Document
The Document displayed in this SuperReader, in read-only mode.
final
documentLayoutKey GlobalKey<State<StatefulWidget>>?
GlobalKey that's bound to the DocumentLayout within this SuperReader.
final
documentOverlayBuilders List<SuperReaderDocumentLayerBuilder>
Layers that are displayed on top of the document layout, aligned with the location and size of the document layout.
final
documentUnderlayBuilders List<SuperReaderDocumentLayerBuilder>
Layers that are displayed beneath the document layout, aligned with the location and size of the document layout.
final
focusNode FocusNode?
final
gestureMode DocumentGestureMode?
The SuperReader gesture mode, e.g., mouse or touch.
final
hashCode int
The hash code for this object.
no setterinherited
iOSHandleColor Color?
Color of the text selection drag handles on iOS.
final
iOSToolbarBuilder WidgetBuilder?
Builder that creates a floating toolbar when running on iOS.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardActions List<ReadOnlyDocumentKeyboardAction>
All actions that this editor takes in response to key events, e.g., text entry, newlines, character deletion, copy, paste, etc.
final
overlayController MagnifierAndToolbarController?
Shows, hides, and positions a floating toolbar and magnifier.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
The ScrollController that governs this SuperReader's scroll offset.
final
selection ValueNotifier<DocumentSelection?>?
final
Leader links that connect leader widgets near the user's selection to carets, handles, and other things that want to follow the selection.
final
selectionStyles SelectionStyles
Styles applied to selected content.
final
shrinkWrap bool
Whether the scroll view used by the reader should shrink-wrap its contents. Only used when reader is not inside an scrollable.
final
stylesheet Stylesheet
Style rules applied through the document presentation.
final
tapRegionGroupId String?
A group ID for a tap region that surrounds the reader and also surrounds any related widgets, such as drag handles and a toolbar.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SuperReader>
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