Skip to content

Disable option for SearchBar #136943

@mauricev

Description

@mauricev

Is there an existing issue for this?

Use case

Sometimes, a user interface element is inappropriate/not applicable for the current program conditions and it would be confusing to entire hide this element. The best alternative is being able to disable the element. Flutter provides this capability for some widgets by passing null to the onPressed.

SearchBar is a widget utilized by some third party plugins such as simple_search_dropdown. I can find no way to disable its widget. However, since it utilizes searchbar, it would be good if searchbar could provide an "enabled" parameter. Passing false to this widget would cause it to ignore mouse clicks, tabbing into it and have it display with a grayed out look to let the user know it's disabled.

Proposal

Explained above.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions