TextEditingDelta class Null safety
A structure representing a granular change that has occurred to the editing state as a result of text editing.
See also:
- TextEditingDeltaInsertion, a delta representing an insertion.
- TextEditingDeltaDeletion, a delta representing a deletion.
- TextEditingDeltaReplacement, a delta representing a replacement.
- TextEditingDeltaNonTextUpdate, a delta representing an update to the selection and/or composing region.
- TextInputConfiguration, to opt-in your DeltaTextInputClient to receive TextEditingDelta's you must set TextInputConfiguration.enableDeltaModel to true.
Constructors
- TextEditingDelta({required String oldText, required TextSelection selection, required TextRange composing})
-
Creates a delta for a given change to the editing state.
const
-
TextEditingDelta.fromJSON(Map<
String, dynamic> encoded) -
Creates an instance of this class from a JSON object by inferring the
type of delta based on values sent from the engine.
factory
Properties
- composing → TextRange
-
The range of text that is still being composed after the delta has been
applied.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- oldText → String
-
The old text state before the delta has occurred.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- selection → TextSelection
-
The range of text that is currently selected after the delta has been
applied.
final
Methods
-
apply(
TextEditingValue value) → TextEditingValue - This method will take the given TextEditingValue and return a new TextEditingValue with that instance of TextEditingDelta applied to it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited