RenderEditable.onSelectionChanged to TextSelectionDelegate.textEditingValue

Supported by Flutter Fix: no

RenderEditable.onSelectionChanged and TextSelectionDelegate.textEditingValue
were deprecated in v1.26.

Instead of calling one or both of these methods, call
TextSelectionDelegate.userUpdateTextEditingValue. This fixed a bug where the
TextInputFormatter would receive the wrong selection value.

Migration guide

Code before migration:

renderEditable

onSelectionChanged

selection

renderObject

cause

);

textSelectionDelegate

textEditingValue

value

Code after migration:

textSelectionDelegate

userUpdateTextEditingValue

value

cause

);

References

API documentation: