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.
Use case
scrollPaddingexists as a parameter inTextFieldand was recently added toSearchBar(#152635), butDropdownMenudoesn't expose it.When a
DropdownMenuis placed near the bottom of a scrollable view, there isno way to control how far above the keyboard it scrolls when focused. The inner
TextFielduses the defaultEdgeInsets.all(20.0)with no way to override it.Current workaround
Manually listening to focus changes and calling
Scrollable.ensureVisiblewith a custom offset.
Proposal
DropdownMenushould have ascrollPaddingparameter that passes through toits inner
TextField, consistent withTextFieldandSearchBar.