NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #487 most downloaded on pub.dev
Flutter's core Dropdown Button widget with a steady dropdown menu and many other options you can customize to your needs.
Last release 5 months ago
29 Apr 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 54 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
94 releases · first in 2021
Release v3.0.0 by @AhmedLSayed9 in #414
barrierBlocksInteraction to allow interaction with underlying widgets while the dropdown menu is open by @liubou-s-inno in #428DropdownButtonFormField2.onChanged ordering relative to Form.onChanged [Flutter core] by @AhmedLSayed9 in #437mouseCursor to the dropdown button and MenuItemStyleData to customize the mouse cursor when hovering by @AhmedLSayed9 in #440Full Changelog: v3.0.0...v3.1.0
One column per quarter.
errorBuilder support for DropdownButtonFormField2 [Flutter core].forceErrorText support for DropdownButtonFormField2 [Flutter core].DropdownButtonFormField2.onChanged ordering relative to Form.onChanged [Flutter core].errorBuilder and errorText [Flutter core].anchoredMinHeight to keep the menu anchored to the button and shrink to fit when possible, closes #429.barrierBlocksInteraction to allow interaction with underlying widgets while the dropdown menu is open.mouseCursor to the dropdown button and MenuItemStyleData to customize the mouse cursor when hovering, closes #416.Remove deprecated lint rules by @AhmedLSayed9 in #270
Iterable instead of List for selectedItemBuilder and multiValueListenable properties by @AhmedLSayed9 in #403Full Changelog: v2.3.8...v3.0.0
A stable release for DropdownButton2 3.0!
Replaces value with valueListenable (and adds multiValueListenable for multi-select).
The button now receives a ValueListenable<T?> and updates from the listenable directly,
so the parent doesn't need to setState.
Instead of:
String? selected;
@override
Widget build(BuildContext context) {
return DropdownButton2<String>(
// Other properties...
value: selected,
onChanged: (value) => setState(() => selected = value),
);
}
do:
final selected = ValueNotifier<String?>(null);
@override
Widget build(BuildContext context) {
return DropdownButton2<String>(
// Other properties...
valueListenable: selected,
onChanged: (value) => selected.value = value,
);
}
For multi-select, use multiValueListenable: ValueNotifier<List<String>>([]) and update the list
inside onChanged. See the multi-select example for the full setup.
Replaces DropdownMenuItem with DropdownItem to provide extra functionality.
Instead of:
items: items.map((String item) => DropdownMenuItem<String>(...)).toList(),
do:
items: items.map((String item) => DropdownItem<String>(...)).toList(),
Support setting different heights for items. Item height is now set per-item instead of globally.
Instead of:
items: items
.map((String item) => DropdownItem<String>(
value: item,
child: Text(item),
))
.toList(),
menuItemStyleData: const MenuItemStyleData(
height: 40,
),
do:
items: items
.map((String item) => DropdownItem<String>(
value: item,
height: 40,
child: Text(item),
))
.toList(),
Add openDropdownListenable property to programmatically open the dropdown menu.
Instead of:
final dropdownKey = GlobalKey<DropdownButton2State>();
@override
Widget build(BuildContext context) {
return Column(
children:[
DropdownButton2<String>(
// Other properties...
key: dropdownKey,
);
// Open the dropdown programmatically:
ElevatedButton(
onTap: () => dropdownKey.currentState!.callTap(),
),
],
);
}
do:
final openDropdownListenable = ValueNotifier<Object?>(null);
@override
Widget build(BuildContext context) {
return Column(
children:[
DropdownButton2<String>(
// Other properties...
openDropdownListenable: openDropdownListenable,
);
// Open the dropdown programmatically:
ElevatedButton(
onTap: () => openDropdownListenable.value = Object(),
),
],
);
}
Rename searchInnerWidget[Height] to searchBarWidget[Height].
closeOnTap property to DropdownItem. It controls whether the dropdown should close when the item is tapped.DropdownDirection.center.barrierCoversButton property, used to specify whether the modal barrier should cover the dropdown button or not.foregroundDecoration property for ButtonStyleData.noResultsWidget property for DropdownSearchData. It can be used to show some widget when the search results are empty.dropdownBuilder property for DropdownStyleData, it can be used to customize the dropdown menu.MenuItemStyleData.useDecorationHorizontalPadding, used to determine whether to use the horizontal padding from "decoration.contentPadding" for menu items when using DropdownButtonFormField2.Iterable instead of List for selectedItemBuilder and multiValueListenable properties.onChanged when tapping enabled item, closes #275.Release v3.0.0-beta.23 by @AhmedLSayed9 in #404
Full Changelog: v3.0.0-beta.24...v3.0.0-beta.25
Release v3.0.0-beta.23 by @AhmedLSayed9 in #398
Iterable instead of List for selectedItemBuilder and multiValueListenable properties by @AhmedLSayed9 in #403Full Changelog: v3.0.0-beta.23...v3.0.0-beta.24
Release v3.0.0-beta.22 by @AhmedLSayed9 in #374
Full Changelog: v3.0.0-beta.22...v3.0.0-beta.23
Release v3.0.0-beta.21 by @AhmedLSayed9 in #335
Full Changelog: v3.0.0-beta.21...v3.0.0-beta.22
MenuItemStyleData.useDecorationHorizontalPadding, used to determine whether to use the horizontal padding from "decoration.contentPadding" for menu items when using DropdownButtonFormField2.Release v3.0.0 beta.20 by @AhmedLSayed9 in #331
Full Changelog: v3.0.0-beta.20...v3.0.0-beta.21
Release v3.0.0 beta.19 by @AhmedLSayed9 in #325
Full Changelog: v3.0.0-beta.19...v3.0.0-beta.20
Release v3.0.0 beta.18 by @AhmedLSayed9 in #322
Full Changelog: v3.0.0-beta.18...v3.0.0-beta.19
Flutter dropdown updates by @AhmedLSayed9 in #320
Full Changelog: v3.0.0-beta.17...v3.0.0-beta.18
Enhance scroll position when using searchable dropdown, closes #285.
Fix dropdown menu position when window changes horizontally, closes #243.
Always call onChanged when tapping enabled item, closes #275.
onChanged when tapping enabled item, closes #275.Optimize scroll performance when dealing with large items list.
BREAKING: Add openDropdownListenable property that can be used to programmatically open the dropdown menu.
BREAKING: Add openDropdownListenable property that can be used to programmatically open the dropdown menu.
Instead of:
final dropdownKey = GlobalKey<DropdownButton2State>();
@override
Widget build(BuildContext context) {
return Column(
children:[
DropdownButton2<String>(
// Other properties...
key: dropdownKey,
);
// Open the dropdown programmatically, like when another button is pressed:
ElevatedButton(
onTap: () => dropdownKey.currentState!.callTap(),
),
],
);
}
do:
final openDropdownListenable = ValueNotifier<Object?>(null);
@override
Widget build(BuildContext context) {
return Column(
children:[
DropdownButton2<String>(
// Other properties...
openDropdownListenable: openDropdownListenable,
);
// Open the dropdown programmatically, like when another button is pressed:
ElevatedButton(
onTap: () => openDropdownListenable.value = Object(),
),
],
);
}
Add dropdownBuilder property for DropdownStyleData, it can be used to customize the dropdown menu.
dropdownBuilder property for DropdownStyleData, it can be used to customize the dropdown menu.Introduce valueListenable and multiValueListenable, which replaces SetState with ValueListenable.
valueListenable and multiValueListenable, which replaces SetState with ValueListenable.Add the possibility to display a dropdown menu centered through DropdownDirection.center.
DropdownDirection.center.barrierCoversButton property, used to specify whether the modal barrier should cover the dropdown button or not.Update DropdownItem to respect intrinsicHeight.
Add foregroundDecoration property for ButtonStyleData.
foregroundDecoration property for ButtonStyleData.Add intrinsicHeight property to DropdownItem. This enables setting item's height according to its intrinsic height.
Fix isExpanded and alignment functionality.
Enhance rendering performance when dealing with big items list.
Add noResultsWidget property for DropdownSearchData. It can be used to show some widget when the search results are empty.
noResultsWidget property for DropdownSearchData. It can be used to show some widget when the search results are empty.Fix inkwell covers error message.
Add border radius parameter for menu item.
- Fix formatting.
BREAKING: Replaces DropdownMenuItem with DropdownItem to provide extra functionality.
BREAKING: Replaces DropdownMenuItem with DropdownItem to provide extra functionality.
Instead of:
items: items.map((String item) => DropdownMenuItem<String>(...)).toList(),
do:
items: items.map((String item) => DropdownItem<String>(...)).toList(),
Add closeOnTap property to DropdownItem. It controls whether the dropdown should close when the item is tapped.
BREAKING: Support setting different heights for items.
Instead of:
items: items
.map((String item) => DropdownItem<String>(
value: item,
child: Text(item),
))
.toList(),
menuItemStyleData: const MenuItemStyleData(
height: 40,
),
do:
items: items
.map((String item) => DropdownItem<String>(
value: item,
height: 40,
child: Text(item),
))
.toList(),
Support adding separator widget internally, closes #134.
Update highlight behavior, closes #184.
Use melos to separate package golden tests, closes #176.
Use null-aware operators for thumbVisibility and thickness.
Remove deprecated isAlwaysShown member.
Remove unnecessary packages from dependencies.
dependencies.- Fix ScrollBar theming.
isFullScreen should be null by default, fixes #157.
isFullScreen should be null by default, fixes #157.Support ScrollBar theming for Cupertino, closes #154.
Nothing published for this version
Update gitignore/pubignore, fixes #153.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Ignore goldens and assets for pub.dev (reduces package size)
- Fix README images.
Update DropdownButtonFormField2 decoration behavior.
Fix button falsely maintaining focus, closes #152.
Fix assertion failure when dropdownStyleData's decoration has an image.
Revert "Remove the deprecated window" and ignore instead.
- Remove the deprecated window.
window.Update dropdown menu's vertical extent.
DropdownStyleData.isFullScreen is deprecated in favor of DropdownStyleData.useRootNavigator.
DropdownStyleData.isFullScreen is deprecated in favor of DropdownStyleData.useRootNavigator.DropdownStyleData.useSafeArea, used to determine if the dropdown menu should only display in
safe areas of the screen.Replace deprecated subtitle1 by titleMedium.
Use generics with searchMatchFn for item type inference.
Add searchBarWidgetHeight, it fixes menu limits and scroll offset when using searchBarWidget.
Avoid overlapping menu items with keyboard when using searchable dropdown.
Add dropdownButtonKey parameter to DropdownButtonFormField2, it allows accessing DropdownButton2State.
Adapt to max items width when buttonWidth & dropdownWidth is null.
Add buttonOverlayColor parameter, It changes the overlay color of the button's InkWell.
- Update README.
Add buttonSplashColor parameter, It changes the splash color of the button's InkWell. close #79,
Your coding agent can read these notes before it upgrades. Set up the MCP server →