canRequestFocus is a duplicate parameter on TextField #149067
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
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.
The text was updated successfully, but these errors were encountered: