Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add scrollPadding property to DropdownMenu #182890

@Hamidrzash

Description

@Hamidrzash

Use case

scrollPadding exists as a parameter in TextField and was recently added to
SearchBar (#152635), but DropdownMenu doesn't expose it.

When a DropdownMenu is placed near the bottom of a scrollable view, there is
no way to control how far above the keyboard it scrolls when focused. The inner
TextField uses the default EdgeInsets.all(20.0) with no way to override it.

Current workaround

Manually listening to focus changes and calling Scrollable.ensureVisible
with a custom offset.

Proposal

DropdownMenu should have a scrollPadding parameter that passes through to
its inner TextField, consistent with TextField and SearchBar.

Metadata

Metadata

Assignees

No one assigned

    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.team-designOwned by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions