Updated EditableText scroll into view behavior
Summary
#The Editable.onCaretChanged
callback is removed. With this change,
EditableText
behavior for scrolling the selection into view
changes.
Context
#Previously, upon scrolling into view to show user updates, EditableText
used multiple mechanisms to determine the extent of the selection or the
caret location.
Description of change
#By removing the Editable.onCaretChanged
callback, EditableText
will always
use the most up-to-date selection extent location when scrolling to show it.
Specifically, this improves scroll into view behavior after
changing selection from collapsed to non-collapsed using
userUpdateTextEditingValue()
.
Timeline
#Landed in version: 3.12.0-4.0.pre
In stable release: 3.13.0
References
#API documentation:
Relevant PRs:
除非另有说明,本文档之所提及适用于 Flutter 的最新稳定版本,本页面最后更新时间: 2024-09-04。 查看文档源码 或者 为本页面内容提出建议。