fl_select library

Public API for the fl_select package.

This library re-exports the core select configuration types (e.g. SelectDelegate), the UI entry points used to render and control selection panels, and the theme classes used to style the panel's built-in widgets.

Classes

CascadingSelectDelegate
A cascading select for category tree data.
ExpandableSelectDelegate
An expandable-group select for category data.
GridSelectDelegate
A grid select for flat (parentless) data.
ListSelectDelegate
A list select for flat (parentless) data.
PopupSelectBar
A tab bar that shows an overlay select panel when a tab is tapped.
PopupSelectBarTheme
Theme extension for PopupSelectBar.
PopupSelectButton
A single-button alternative to PopupSelectBar.
PopupSelectButtonTheme
Theme extension for PopupSelectButton.
PopupSelectController
Controller for PopupSelectBar and its select overlay.
PopupSelectControllerProvider
Provides a PopupSelectController to descendants.
PopupTab
A tab widget used inside PopupSelectBar.
PopupTabData
Tab label data for PopupSelectBar.
SelectActionBar
Action bar for select panels.
SelectActionBarTheme
Theme configuration for SelectActionBar.
SelectCascadingLayout
Cascading (multi-column) layout for the children of a SelectCategoryEntry.
SelectCascadingViewTheme
Theme configuration for the cascading view (the multi-column item area shared by CascadingSelect and the SelectCascadingLayout branch of the category containers).
SelectCategoryEntry<E>
A category entry (i.e. a root node).
SelectChildEntry<E>
A child entry (i.e. a non-root node).
SelectChipBarTheme
Theme configuration for the chip bar.
SelectController
Controller for a single SelectDelegate instance.
SelectControllerProvider
SelectCounterLayout
Counter (spin-box) layout for the children of a SelectCategoryEntry.
SelectDelegate
Base configuration for a select.
SelectEntry<E>
Base class for all select entries.
SelectEntryCodec
Encoding and decoding of SelectEntry trees as JSON-compatible maps.
SelectExpansionTileTheme
SelectFieldTileTheme
Theme configuration for the field tile.
SelectGridLayout
Grid layout for the children of a SelectCategoryEntry.
SelectGridTileTheme
Theme configuration for the grid tile.
SelectLabelState
Tab-agnostic label / selection state shared by PopupSelectBar (via PopupTabData) and PopupSelectButton.
SelectLayout
Sealed layout descriptor for the children of a SelectCategoryEntry.
SelectListLayout
Vertical list layout for the children of a SelectCategoryEntry.
SelectListTileTheme
Theme configuration for the list tile, including toggle builders.
SelectLocalizations
Localized business strings for the fl_select package.
SelectLocalizationsDelegate
The LocalizationsDelegate for SelectLocalizations.
SelectOverlayStyle
Visual configuration for SelectOverlay.
SelectPanelTheme
Defines the elevation, shadow and shape decoration applied to the panel background.
SelectRangeEntry<N, E>
A range-based entry (e.g. min/max).
SelectRangeLayout
Range-slider layout for the children of a SelectCategoryEntry.
SelectRangeSliderTheme
Theme configuration for the range slider.
SelectSearchBarTheme
Theme configuration for the search bar.
SelectSideBarTheme
Defines a theme for the sidebar widgets.
SelectTabBarTheme
Defines a theme for SelectTabBar widgets.
SelectTextEntry<E>
A plain text entry.
SelectTheme
Provides SelectThemeData to select widgets.
SelectThemeData
Theme configuration for select widgets.
SelectView
A high-level, ready-to-use select.
SelectWrapLayout
Wrap of chips layout for the children of a SelectCategoryEntry.
SelectWrapViewTheme
Theme configuration for the wrap view.
SideNavSelectDelegate
A side-navigation select for category data.
TabNavSelectDelegate
A tab-nav (top-navigation) select for category data.
WrapSelectDelegate
A wrap select for flat (parentless) data.

Enums

BadgeStyle
Badge rendering style.
PopupSelectButtonVariant
Visual variants for PopupSelectButton.
PopupSelectDirection
Vertical placement strategy for the select overlay relative to its trigger (a PopupSelectButton or PopupSelectBar).
SelectArrayFormat
Multi-value layouts for serializing repeated values into a URL query string via toQueryParameters.
SelectChipVariant
Visual variant for chip.
SelectFieldTileVariant
Visual variant for the field tile.
SelectGridTileVariant
Visual variant for the grid tile.
SelectionMode
Selection mode for a category or select.
SelectTabBarIndicatorSize
Whether the tab indicator's width should match the tab or the tab's label, mirroring Flutter's TabBarIndicatorSize.

Extensions

IterableExtension on Iterable<SelectEntry>
SelectCategoryEntryExtension on SelectCategoryEntry
Extensions on SelectCategoryEntry: resolving the effective (non-null) selection modes against a delegate-level fallback, and custom range entry lookups.
SelectChildEntryExt on SelectChildEntry
SelectEntriesExtension on SelectEntries
SelectEntryExt on SelectEntry
SelectRangeEntryExt on SelectRangeEntry

Constants

kAnyEntryId → const String
Special entry id representing the "Any" entry.
kCustomEntryId → const String
Special entry id representing a user-provided/custom value.
kPopupSelectBarHeight → const double
Default height for PopupSelectBar when no theme override is provided.
kPopupSelectButtonHeight → const double
Default height used when the button size cannot be measured yet.

Functions

defaultSelectSearchPredicate(SelectEntry entry, String query) → bool
The default search predicate: case-insensitive substring match on SelectEntry.name. Returns true when the name contains query.
filterEntriesForSearch(List<SelectEntry> entries, String query, {SelectSearchPredicate? predicate}) → List<SelectEntry>
Filters entries for the given query, preserving the original tree structure.
showModalBottomSelect({required BuildContext context, required SelectDelegate delegate, bool isScrollControlled = false, bool useRootNavigator = false, bool isDismissible = true, bool useSafeArea = false, Widget? title, Widget? leading, Widget? trailing, bool? centerTitle, Color? backgroundColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior, BoxConstraints? constraints, Color? barrierColor, bool enableDrag = true, bool? showDragHandle, RouteSettings? routeSettings, Offset? anchorPoint}) → Future<SelectEntries?>
Shows a select in a modal bottom sheet built with Flutter's showModalBottomSheet.
showSelect({required BuildContext context, required SelectDelegate delegate, bool barrierDismissible = true, bool useRootNavigator = true, Widget? title, Widget? leading, Widget? trailing, bool? centerTitle, double? elevation, EdgeInsets? insetPadding, Clip? clipBehavior, ShapeBorder? shape, TransitionBuilder? builder, Color? barrierColor, RouteSettings? routeSettings, Offset? anchorPoint}) → Future<SelectEntries?>
Shows a select in a modal dialog.
testAnyElement(SelectEntry e) → bool
Returns true if the entry is an "Any" child entry.
testCustomElement(SelectEntry e) → bool
Returns true if the entry is a custom range entry.
testMultipleElement(SelectEntry e) → bool
Returns true if the entry is a category explicitly configured with SelectionMode.multiple.
testNotCustomItem(SelectEntry e) → bool
Returns true if the entry is not a custom range entry.
testSameParentAnyOrCustomElement(SelectEntry e, String parentId) → bool
Returns true if the entry has the same parent as the given parentId and is an "Any" or a custom range entry.
testSameParentElement(SelectEntry e, String parentId) → bool
Returns true if the entry has the same parent as the given parentId.

Typedefs

PopupSelectBarResultCallback = void Function(PopupTabData tabData, SelectEntries selected)
Callback for selection change or apply events from a PopupSelectBar.
PopupSelectBarToggleCallback = void Function(PopupTabData tabData)
Callback parameter indicates which select is being shown or hidden.
PopupSelectBarWillToggleCallback = FutureOr<bool> Function(PopupTabData tabData)
PopupSelectButtonResultCallback = void Function(SelectEntries selected)
Callback invoked with the selected entries only — used by
PopupSelectButtonWillToggleCallback = FutureOr<bool> Function()
PopupSelectLabelChangeCallback = void Function(SelectLabelState labelState, SelectEntries selected)
Tab-agnostic change callback used internally by PopupSelectController.
SelectActionBarBuilder = Widget Function(BuildContext context, {required VoidCallback onApplyTap, required VoidCallback onResetTap})
Builds the action bar shown at the bottom of the select panel.
SelectCallback = void Function(SelectEntries selected)
Callback invoked with the currently selected entries.
SelectEntries<E> = Set<SelectEntry<E>>
A set of SelectEntry values, in iteration order: the shape the library uses wherever it holds a collection of entries — selected entries, cloned trees, and an entry's own SelectEntry.children.
SelectIntEntry<E> = SelectRangeEntry<int, E>
Convenience alias for an integer range entry.
SelectItemBuilder = Widget? Function(BuildContext context, SelectEntry entry, {String? categoryId, required VoidCallback onTap, required bool selected})
Builds a fully custom item widget for one select entry.
SelectLabelLoader = String Function(SelectEntries selected)
Builds a custom label for a select / tab from the applied selection.
SelectSearchPredicate = bool Function(SelectEntry entry, String query)
A predicate that decides whether entry matches query.
ToggleWidgetBuilder = Widget Function(BuildContext context, bool selected)
Builds a custom toggle widget (radio/checkbox).