TextComponentState class
Inheritance
Implemented types
Mixed-in types
Methods
activate ()
→ void
Called when this object is reinserted into the tree after having been
removed via deactivate .
inherited
build (BuildContext context )
→ Widget
Describes the part of the user interface represented by this widget.
override
deactivate ()
→ void
Called when this object is removed from the tree.
inherited
debugFillProperties (DiagnosticPropertiesBuilder properties )
→ void
Add additional properties associated with the node.
inherited
didChangeDependencies ()
→ void
Called when a dependency of this State object changes.
inherited
didUpdateWidget (covariant TextComponent oldWidget )
→ void
Called whenever the widget configuration changes.
inherited
dispose ()
→ void
Called when this object is removed from the tree permanently.
inherited
getAllText ()
→ String
Returns all text in this text composable.
override
getBeginningPosition ()
→ TextNodePosition
Returns the node position that represents the "beginning" of
the content within this component, such as the first character
of a paragraph.
override
getBeginningPositionNearX (double x )
→ TextNodePosition
Returns the earliest position within this component's
DocumentNode that appears at or near the given x
position.
override
getCollapsedSelectionAt (NodePosition textNodePosition )
→ TextNodeSelection
Returns a NodeSelection within this component's DocumentNode that
is collapsed at the given nodePosition
override
getContiguousTextAt (TextNodePosition textPosition )
→ String
Returns all text surrounding textPosition
that isn't
broken by newlines.
override
getContiguousTextSelectionAt (TextNodePosition textPosition )
→ TextNodeSelection
Returns a TextNodeSelection that encompasses all text surrounding
textPosition
that isn't broken by newlines.
override
getDesiredCursorAtOffset (Offset localOffset )
→ MouseCursor ?
Returns the desired MouseCursor at the given (x,y) localOffset
, or
null
if this component has no preference for the cursor style.
override
getEdgeForPosition (NodePosition nodePosition )
→ Rect
Returns the upstream edge or downstream edge of the content at the given
position
.
override
getEndPosition ()
→ TextNodePosition
Returns the [NodePosition that represents the "end" of
the content within this component, such as the last character
of a paragraph.
override
getEndPositionNearX (double x )
→ TextNodePosition
Returns the latest position within this component's
DocumentNode that appears at or near the given x
position.
override
getOffsetForPosition (dynamic nodePosition )
→ Offset
Returns the (x,y) Offset for the given nodePosition
, or throws
an exception if the given nodePosition
is not compatible
with this component's node type.
override
getPositionAtEndOfLine (TextNodePosition textPosition )
→ TextNodePosition
Returns the TextNodePosition that corresponds to the last character
in the line of text that contains the given textNodePosition
.
override
getPositionAtOffset (Offset localOffset )
→ TextNodePosition ?
Returns the node position within this component at the given
localOffset
, or null
if the localOffset
does not sit
within any content.
override
getPositionAtStartOfLine (TextNodePosition textNodePosition )
→ TextNodePosition
Returns the node position that corresponds to the first character
in the line of text that contains the given textNodePosition
.
override
getPositionOneLineDown (NodePosition textPosition )
→ TextNodePosition ?
Returns the TextNodePosition that corresponds to a text location
that is one line below the given textNodePosition
, or null
if
there is no position one line down.
override
getPositionOneLineUp (NodePosition textPosition )
→ TextNodePosition ?
Returns the TextNodePosition that corresponds to a text location
that is one line above the given textNodePosition
, or null
if
there is no position one line up.
override
getRectForPosition (dynamic nodePosition )
→ Rect
Returns a Rect for the given nodePosition
, or throws
an exception if the given nodePosition
is not compatible
with this component's node type.
override
getRectForSelection (dynamic baseNodePosition , dynamic extentNodePosition )
→ Rect
Returns a Rect that bounds the content selected between
baseNodePosition
and extentNodePosition
.
override
getSelectionBetween ({required NodePosition basePosition , required NodePosition extentPosition })
→ TextNodeSelection
Returns a NodeSelection within this component's DocumentNode that
spans from basePosition
to extentPosition
.
override
getSelectionInRange (Offset localBaseOffset , Offset localExtentOffset )
→ TextNodeSelection
Returns a selection of content that appears between the localBaseOffset
and the localExtentOffset
, or null
if the given region does not
include any of the content within this component.
override
getSelectionOfEverything ()
→ TextNodeSelection
Returns a [NodeSelection that includes all content within the node.
override
getTextStyleAt (int offset )
→ TextStyle
Return the TextStyle for the character at offset
.
getWordSelectionAt (TextNodePosition textPosition )
→ TextNodeSelection
Returns a TextNodeSelection that encompasses the entire word
found at the given textNodePosition
.
override
initState ()
→ void
Called when this object is inserted into the tree.
inherited
isVisualSelectionSupported ()
→ bool
Returns true
if this component changes its visual appearance when
selected, or false
otherwise.
inherited
movePositionDown (NodePosition textNodePosition )
→ TextNodePosition ?
Returns a new position within this component's node that
corresponds to the currentPosition
moved down one unit,
as interpreted by this component/node.
override
movePositionLeft (NodePosition textPosition , [MovementModifier ? movementModifier ])
→ TextNodePosition ?
Returns a new position within this component's node that
corresponds to the currentPosition
moved left one unit,
as interpreted by this component/node, in conjunction with
any relevant movementModifier
.
override
movePositionRight (NodePosition textPosition , [MovementModifier ? movementModifier ])
→ TextNodePosition ?
Returns a new position within this component's node that
corresponds to the currentPosition
moved right one unit,
as interpreted by this component/node, in conjunction with
any relevant movementModifier
.
override
movePositionUp (NodePosition textNodePosition )
→ TextNodePosition ?
Returns a new position within this component's node that
corresponds to the currentPosition
moved up one unit,
as interpreted by this component/node.
override
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reassemble ()
→ void
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
setState (VoidCallback fn )
→ void
Notify the framework that the internal state of this object has changed.
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
toStringShort ()
→ String
A brief description of this object, usually just the runtimeType and the
hashCode .
inherited