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

canRequestFocus is a duplicate parameter on TextField #149067

Open
justinmc opened this issue May 24, 2024 · 1 comment
Open

canRequestFocus is a duplicate parameter on TextField #149067

justinmc opened this issue May 24, 2024 · 1 comment
Labels
a: text input Entering text in a text field or keyboard related problems c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-text-input Owned by Text Input team triaged-text-input Triaged by Text Input team

Comments

@justinmc
Copy link
Contributor

justinmc commented May 24, 2024

Use case

Instead of TextField.canRequestFocus, people should use TextField.focusNode.canRequestFocus. The parameter should be removed to avoid the complexity that comes with this duplication.

Proposal

Deprecate TextField.canRequestFocus. Cases that use it, such as DropdownMenu, should migrate to focusNode.canRequestFocus.

History

TextField.canRequestFocus was added in #117504 as an oversight (see #130011 (comment)).

I attempted to fix this with #132273, but I ran into Google test failures that I wasn't sure how to fix.

@darshankawar darshankawar added in triage Presently being triaged by the triage team a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. c: proposal A detailed proposal for a change to Flutter team-design Owned by Design Languages team and removed in triage Presently being triaged by the triage team labels May 27, 2024
@Piinks Piinks added team-text-input Owned by Text Input team and removed team-design Owned by Design Languages team labels May 29, 2024
@justinmc justinmc added P3 Issues that are less important to the Flutter project triaged-text-input Triaged by Text Input team labels May 30, 2024
@justinmc
Copy link
Contributor Author

Was this actually intentional in #117504? I need to look through that conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-text-input Owned by Text Input team triaged-text-input Triaged by Text Input team
Projects
None yet
Development

No branches or pull requests

3 participants