Skip to content

Add onSubmitted to SearchBar #126551

@deakjahn

Description

@deakjahn

Is there an existing issue for this?

Use case

There might be a (possibly different) action to be initiated when the user finishes the text entry and presses the Done button on the keyboard. In some use cases, interim suggestions are not required, a search anchor is not used but the existing Material look & feel of a standalone SearchBar would be welcome.

Proposal

Add an optional onSubmitted handler to allow the developer to decide which event to act upon.

Metadata

Metadata

Assignees

Labels

c: 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.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions