-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input team
Description
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.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input team