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) {
if(newValue.selection.baseOffset >= newValue.text.length){
print("will add space");
newValue = newValue
.copyWith(
text: newValue.text.trimRight() + " ",
selection: newValue.selection.copyWith(baseOffset: newValue.text.length, extentOffset: newValue.text.length));
}
if(newValue.text == " "){
newValue = newValue
.copyWith(
text: "",
selection: newValue.selection.copyWith(baseOffset: 0, extentOffset: 0));
}
_processNewValue(newValue);
super.value = newValue;
}