value property
The current value stored in this notifier.
When the value is replaced with something that is not equal to the old value as evaluated by the equality operator ==, this class notifies its listeners.
Implementation
@override
T get value => _value;
Implementation
@override
set value(TextEditingValue newValue) {
final loc = _insertedLoc(text, newValue.text);
if (loc != null) {
final char = newValue.text[loc];
final modifier = modifierMap[char];
final val = modifier?.updateString(rawText, selection, params);
if (val != null) {
// Update newValue
newValue = newValue.copyWith(
text: val.text,
selection: val.selection,
);
}
}
// Now fix the textfield for web
if (_webSpaceFix)
newValue = newValue.copyWith(text: _spacesToMiddleDots(newValue.text));
if (onChange != null)
onChange!(
_webSpaceFix ? _middleDotsToSpaces(newValue.text) : newValue.text);
super.value = newValue;
}