-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Add warnings and an example to the TextEditingController docs #28604
Conversation
There was a problem hiding this 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]. |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same.
854f28f
to
7745ca9
Compare
Fixes #28307