userUpdateTextEditingValue method
Indicates that the user has requested the delegate to replace its current
text editing state with value
.
The new value
is treated as user input and thus may subject to input
formatting.
See also:
- EditableTextState.userUpdateTextEditingValue: an implementation that
applies additional pre-processing to the specified
value
, before updating the text editing state.
Implementation
@override
void userUpdateTextEditingValue(
TextEditingValue value, SelectionChangedCause cause) {
// _selectionOverlay?.update(value);
_textInputConnection?.setEditingState(value);
final TextSelection old = _value.selection;
_value = value;
if (old != value.selection ||
cause == SelectionChangedCause.longPress ||
cause == SelectionChangedCause.keyboard) {
_handleSelectionChanged(value.selection, cause);
}
if (mounted) {
setState(() {});
}
}