TextScrollView class
A scrollable that positions its child based on text metrics.
The child must contain a SuperText in its tree,
textKey must refer to that SuperText, and the
dimensions of the child subtree should match the dimensions
of the SuperText so that there are no surprises
when the scroll offset is configured based on where a given
character appears in the child layout.
TextScrollView defers to textScrollController for its scroll offset. TextScrollView sets itself as a TextScrollControllerDelegate on the textScrollController. This relationship allows the textScrollController to make decisions about the scroll offset based on layout information returned from this TextScrollView.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TextScrollView
Constructors
-
TextScrollView({Key? key, required TextScrollController textScrollController, required GlobalKey<
ProseTextState< textKey, required AttributedTextEditingController textEditingController, int? minLines, int? maxLines, double? lineHeight, Duration perLineAutoScrollDuration = Duration.zero, bool showDebugPaint = false, TextAlign textAlign = TextAlign.left, EdgeInsets? padding, required Widget child})StatefulWidget> > -
const
Properties
- child → Widget
-
The child widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lineHeight → double?
-
The height of a single line of text in this text scroll view, used
with minLines and maxLines to size the text field.
final
- maxLines → int?
-
The maximum height of this text scroll view, represented as a
line count.
final
- minLines → int?
-
The minimum height of this text scroll view, represented as a
line count.
final
- padding → EdgeInsets?
-
Padding placed around the text content of this text field, but within the
scrollable viewport.
final
- perLineAutoScrollDuration → Duration
-
The time it takes to scroll to the next line, when auto-scrolling.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDebugPaint → bool
-
Whether to paint debug guides.
final
- textAlign → TextAlign
-
The text alignment within the scrollview.
final
- textEditingController → AttributedTextEditingController
-
Controller that owns the text content and text selection for
the
SuperSelectableTextwithin the child subtree.final -
textKey
→ GlobalKey<
ProseTextState< StatefulWidget> > -
GlobalKey that references the widget that contains the scrolling text.
final
- textScrollController → TextScrollController
-
Controller that sets the scroll offset and orchestrates
auto-scrolling behavior.
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