Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warnings and an example to the TextEditingController docs #28604

Merged
merged 2 commits into from
Feb 28, 2019

Conversation

HansMuller
Copy link
Contributor

Fixes #28307

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -89,10 +133,17 @@ class TextEditingController extends ValueNotifier<TextEditingValue> {
/// that they need to update (it calls [notifyListeners]). For this reason,
/// this value should only be set between frames, e.g. in response to user
/// actions, not during the build, layout, or paint phases.
///
/// This property can be set from a listener added to this
/// [TextEditingController] however one should not also set [selection].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like there is a full stop or maybe comma missing before "however"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the pedants (their word, not mine) would have us put a semicolon before the "however" and a comma afterwards: http://www.arrantpedantry.com/2012/02/07/however/. I will obey; however, I am confident that I will never understand all of the rules for commas.

@@ -104,6 +155,11 @@ class TextEditingController extends ValueNotifier<TextEditingValue> {
/// that they need to update (it calls [notifyListeners]). For this reason,
/// this value should only be set between frames, e.g. in response to user
/// actions, not during the build, layout, or paint phases.
///
/// This property can be set from a listener added to this
/// [TextEditingController] however one should not also set [text].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

@HansMuller HansMuller merged commit 9f35f6c into flutter:master Feb 28, 2019
@HansMuller HansMuller deleted the editing_controller_value branch February 28, 2019 01:24
@zoechi zoechi added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ labels Feb 28, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: text input Entering text in a text field or keyboard related problems d: api docs Issues with https://api.flutter.dev/ framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing text editing controller's selection hangs
5 participants