dropdown_custom 0.4.0
dropdown_custom: ^0.4.0 copied to clipboard
A customizable, zero-dependency dropdown with search, grouping, per-item enable/disable, custom colors, and free positioning (top/bottom/left/right).
0.4.0 #
-
Granular, independent styling split into three groups, replacing the old
DropdownDecoration:fieldStyle(DropdownFieldStyle) — input field: background, border color and width, radius, value/hint text styles, arrow icon color, padding.menuStyle(DropdownMenuStyle) — menu box and rows: background, border, radius, elevation, item/selected/group-header text styles, highlight and selected colors, disabled color, sizing.searchStyle(DropdownSearchStyle) — search bar: fill, border and focused-border colors, radius, text and hint styles, icon color, padding.
-
The input field and the menu can now be themed separately (previously they shared one decoration), and the search bar is fully themable.
Migration: replace
decoration: DropdownDecoration(...)with the relevantfieldStyle/menuStyle/searchStyle. (textStyleon menu items is nowmenuStyle.itemTextStyle.)
0.3.0 #
- Add async loading via the
CustomDropdown.asyncconstructor: aloader(query)fetches items for the debounced search query, with a loading spinner, an error state plus retry, and the empty state. Results are used as-is (the loader owns filtering). Debounce and error/retry labels are configurable. - Customizable loading indicator via the
loadingparameter and the newDropdownLoadingtype:DropdownLoading.circular(with a custom color),DropdownLoading.shimmer(animated skeleton with custom base/highlight colors, zero dependencies), orDropdownLoading.custom(your own widget). - Customizable empty and error states:
emptyBuilder(all constructors) anderrorBuilder(async) let you render your own widgets.errorBuilderreceives the thrown error and a retry callback.
0.2.0 #
- Add multi-select via the
CustomDropdown.multiconstructor: checkboxes, the menu stays open while toggling,onSelectionChangedreports the full selection, andselectedItemsLabelcustomizes the trigger text. - Optional "select all" / "clear" actions for multi-select via
showSelectAll(default off), with customizableselectAllLabel/clearAllLabel. Both respect the active search filter and skip disabled items. - Multi-select reuses all existing features (search, grouping, positioning, per-item enable/disable, custom colors).
0.1.0 #
Initial release — single-select foundation.
- Generic
CustomDropdown<T>that works over any model type. - Free positioning:
top,bottom,left,right, andauto(auto-flip). - Built-in search (
enableSearch) with an optional custom matcher. - Grouping via
groupBywith group headers. - Per-item enable/disable via
isItemEnabled. - Custom colors and styling through
DropdownDecoration. - Optional custom item rows via
itemBuilder. - Zero runtime dependencies (Flutter SDK only).