Skip to content

Add scrollPadding property to SearchBar #152442

@linussorg

Description

@linussorg

Use case

A SearchBar is usually used with a list of Widgets underneath that show the search results. When focusing the SearchBar in a ListView, the SearchBar scrolls into view so that it's at the bottom of the view, right above the keyboard. However, it would be useful if it scrolled a little more so that the search results would also be visible. This is something that could be achieved by implementing the scrollPadding property.

Proposal

Just like TextField does, SearchBar should have a scrollPadding property. This would enable control over how a SearchBar scrolls into view when the keyboard opens.

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