value property
The current value held by this object.
Implementation
@override
TextEditingValue get value =>
TextEditingValue(text: text, selection: selection);
set
value
(TextEditingValue newValue)
Sets the value and notifies listeners.
Implementation
set value(TextEditingValue newValue) {
if (value == newValue) return;
_model.value = newValue.text;
if (newValue.selection.isCollapsed) {
_model.selectionStart = null;
_model.selectionEnd = null;
} else {
_model.selectionStart = newValue.selection.baseOffset;
_model.selectionEnd = newValue.selection.extentOffset;
}
_model.position = newValue.selection.extentOffset;
notifyListeners();
}