-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.fyi-text-inputFor the attention of Text Input teamFor the attention of Text Input teamteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Use case
If I have a TextField widget that uses a suffixIcon, but the text field has enabled: false, the suffixIcon is not interactable, even though it has an onPressed set.
Example:
TextField(
enabled: false,
decoration: InputDecoration(
suffixIcon: IconButton(
onPressed: () {
print('pressed');
},
icon: Icon(Icons.edit_outlined, size: 20, color: Colors.blue),
)
),
)I tried setting the enabled state of the InputDecoration, but that didn't help.
Per the docs:
If false helperText, errorText, and counterText are not displayed, and the opacity of the remaining visual elements is reduced.
Related: flutter-form-builder-ecosystem/flutter_form_builder#442
Proposal
Let the suffix icon handle its enabled state separately from the text field's enabled state. Maybe by allowing it to read the enabled state separately from the InputDecoration, without looking at TextField.enabled ?
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.fyi-text-inputFor the attention of Text Input teamFor the attention of Text Input teamteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team