flex_dropdown
0.2.0, released 2 years ago by snappx.io
Create custom dropdowns with styling, animations, and flexible data sources in Flutter.
What it does
The package enables you to easily implement dropdown menus with custom styling, custom animations, and data sources. It provides a RawFlexDropDown widget that utilizes OverlayPortal for flexible positioning and menu control.
AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to build a custom dropdown widget with precise positioning and custom button or menu layouts.
- You want to manage dropdown visibility with an OverlayPortalController.
Skip it when
- You are looking for a fully styled Material Design dropdown out of the box without building custom widgets.
- You need a simple standard form dropdown field and don't need custom styling or animations.
Strengths
- Supports custom styling and animations for dropdown menus.
- Precise positioning and dismissal on tap outside.
- Uses OverlayPortal for smooth rendering over other widgets.
Weaknesses
- Requires writing custom button and menu builders rather than providing a plug-and-play standard dropdown field.
- Not documented with extensive pre-built UI themes.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
final OverlayPortalController _controller = OverlayPortalController();
@override
Widget build(BuildContext context) {
return RawFlexDropDown(
controller: _controller,
dismissOnTapOutside: true,
buttonBuilder: (context, onTap) {
return ButtonWidget(
width: 500,
onTap: onTap,
);
},
menuBuilder: (context, width) {
return Padding(
padding: const EdgeInsets.only(top: 4),
child: MenuWidget(
width: width,
onItemTap: () {
_controller.hide();
},
),
);
},
);
}Alternatives
Packages that do the same job and could replace flex_dropdown.
- zod_validation
Data validation library for Flutter forms and Shelf backend requests.
44Compare - drop_down_list
A customizable dropdown widget supporting single/multiple selection and integrated search.
64Compare - dropdown_plus
Simple and customizable form dropdown with search and remote data source support.
48Compare