TextEditingValue class
The current text, selection, and composing state for editing a run of text.
- Annotations
- @immutable
Constructors
- TextEditingValue({String text: '', TextSelection selection: const TextSelection.collapsed(offset: -1), TextRange composing: TextRange.empty })
-
Creates information for editing a run of text. [...]
const
-
TextEditingValue.fromJSON(Map<
String, dynamic> encoded) -
Creates an instance of this class from a JSON object.
factory
Properties
- composing → TextRange
-
The range of text that is still being composed.
final
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- selection → TextSelection
-
The range of text that is currently selected.
final
- text → String
-
The current text being edited.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
copyWith(
{String text, TextSelection selection, TextRange composing }) → TextEditingValue - Creates a copy of this value but with the given fields replaced with the new values.
-
toJSON(
) → Map< String, dynamic> - Returns a representation of this object as a JSON object.
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
override
Constants
- empty → const TextEditingValue
-
A value that corresponds to the empty string with no selection and no composing range.
const TextEditingValue()