dropdown_button2
4.0.0, released 3 days ago by an unverified publisher
Customizable Flutter dropdown button with advanced styling and multi-select support
What it does
Provides a DropdownButton2 widget that extends Flutter’s core dropdown with features like custom positioning, scrollable menus, multi-select, searchable lists, and form integration via DropdownButtonFormField2.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need a dropdown with custom styling or positioning
- Require multi-select or searchable dropdowns
- Want to integrate a dropdown into a Form with validation
Skip it when
- Working on a very small project where the default DropdownButton suffices
- Need a dropdown that supports complex animations beyond what this package offers
Strengths
- Rich set of customization options (offset, max height, scrollbar, custom button)
- Supports multi-select and searchable dropdowns out of the box
- Integrates with forms via DropdownButtonFormField2
- Open source MIT license
Weaknesses
- No support for async data loading or network integration
- Requires manual handling of ValueListenable for state management
- No built‑in theming beyond basic styles
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Add dependency to pubspec, import package, and use the widget directly
```dart
DropdownButton2<String>(
items: ['One', 'Two', 'Three'].map((e) => DropdownMenuItem(value: e, child: Text(e))).toList(),
valueListenable: ValueNotifier<String?>('One'),
onChanged: (v) => print(v),
)
```Alternatives
Packages that do the same job and could replace dropdown_button2.
- dropdown_below
Customizable dropdown widget for Flutter
48Compare - percent_indicator
Circular, linear, and multi-segment percentage progress indicator widgets for Flutter.
67Compare - flutter_context_menu
Create and display customizable context menus with hierarchical submenus in Flutter apps.
66Compare - rounded_loading_button_plus
Animated button with loading, success and error states for Flutter.
50Compare
Works with
Packages commonly used together with dropdown_button2: ones it builds on, ones built on it, and its own family.