fl_select library
Public API for the fl_select package.
This library re-exports the core select configuration types (e.g. SelectDelegate) and the UI widgets used to render and control selection panels.
Classes
- CascadingSelectDelegate
- A cascading select for two-level-or-deeper (category) tree data.
- ChainingClampingScrollPhysics
- Touch-gesture scroll chaining shared by the select bodies hosted inside a page-level scrollable.
- ExpandableSelectDelegate
- An expandable-group select for two-level (category) data.
- FlattenSelectDelegate
- Deprecated "flatten" select.
- GridSelectDelegate
- A grid select for flat (parentless) data.
- ListSelectDelegate
- A list select that renders entries as a single expandable list.
- 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.
- SelectActionBarSkeleton
- Loading skeleton for SelectActionBar.
- SelectActionBarTheme
- Theme configuration for SelectActionBar.
- SelectBadge
-
SelectCategoryEntry<
E> - A category entry (i.e. a root node).
- SelectCheckboxListTile
- A select list tile with a checkbox trailing widget.
-
SelectChildEntry<
E> - A child entry (i.e. a non-root node).
- SelectChip
- A single selectable chip as rendered inside SelectChipBar and SelectWrapView.
- SelectChipBar
- A single-row, horizontally scrollable chip bar for selecting among sibling SelectEntry entries — the classic "quick filter" strip.
- SelectChipBarSkeleton
- Loading skeleton for SelectChipBar.
- SelectChipBarStyle
- The fully-resolved visual configuration of a chip view, produced by resolveSelectChipBarStyle.
- SelectChipBarTheme
- Theme configuration for SelectChipBar.
- SelectChipLayout
- Deprecated alias of SelectWrapLayout.
- SelectController
- Controller for a single SelectDelegate instance.
- SelectControllerProvider
- SelectCounter
- A spin-box counter for a single-valued SelectCategoryEntry.
- SelectCounterLayout
- Counter (spin-box) layout for the children of a SelectCategoryEntry.
- SelectCounterSkeleton
- Loading skeleton for SelectCounter.
- 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.
- SelectExpansionTile
- SelectExpansionTileTheme
- SelectFieldTile
- A range input tile for a SelectRangeEntry.
- SelectFieldTileTheme
- Theme configuration for SelectFieldTile.
- SelectGridLayout
- Grid layout for the children of a SelectCategoryEntry.
- SelectGridSkeleton
- Loading skeleton for SelectGridView.
- SelectGridTile
- A grid tile used by select grid layouts.
- SelectGridTileTheme
- Theme configuration for SelectGridTile.
- SelectGridView
- A grid view that renders terminal-node SelectEntry entries as selectable grid tiles.
- SelectGridViewState
- 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.
- SelectListSkeleton
- Loading skeleton for SelectListView.
- SelectListTile
- Base list tile used by select views.
- SelectListTileTheme
- Theme configuration for SelectListTile, including toggle builders.
- SelectListView
- A list view that renders terminal-node SelectEntry entries as selectable radio or checkbox tiles.
- SelectListViewState
- SelectLocalizations
-
Localized business strings for the
fl_selectpackage. - SelectLocalizationsDelegate
- The LocalizationsDelegate for SelectLocalizations.
- SelectOverlayStyle
-
Visual configuration for
SelectOverlay. - SelectPanel
- A widget that renders a SelectDelegate and manages its selection state.
- SelectPanelTheme
- Defines the elevation, shadow and shape decoration applied to the SelectPanel background.
- SelectRadioListTile
- A select list tile with a radio trailing widget.
-
SelectRangeEntry<
N, E> - A range-based entry (e.g. min/max).
- SelectRangeLayout
- Range-slider layout for the children of a SelectCategoryEntry.
- SelectRangeSkeleton
- Loading skeleton for SelectRangeView.
- SelectRangeSlider
- A custom-drawn dual-thumb range slider.
- SelectRangeSliderTheme
- Theme configuration for SelectRangeSlider.
- SelectRangeView
- A composite view that renders a SelectRangeSlider above a SelectFieldTile, keeping both in sync with a single SelectRangeEntry as the source of truth.
- SelectSearchBar
- A search bar widget used inside the select panel to filter entries.
- SelectSearchBarTheme
- Theme configuration for SelectSearchBar.
- SelectSideBar
- SelectSideBarSkeleton
- Loading skeleton for SelectSideBar.
- SelectSideBarTheme
- Defines a theme for SelectSideBar widgets.
- SelectTabBar
- SelectTabBarSkeleton
- Loading skeleton for SelectTabBar.
- 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.
- SelectWrapView
- A wrap chip group for selecting among sibling SelectEntry entries.
- SelectWrapViewSkeleton
- Loading skeleton for SelectWrapView.
- A side-navigation select for two-level (category) data.
- SkeletonTile
- A rectangular placeholder used inside SkeletonView.
- SkeletonView
- A shimmering wrapper used for loading skeleton UIs.
- A tab-nav (top-navigation) select for two-level (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 chips rendered by SelectChipBar.
- SelectFieldTileVariant
- Visual variant for SelectFieldTile.
- SelectGridTileVariant
- Visual variant for SelectGridTile.
- SelectionMode
- Selection mode for a category or select.
- SelectTabBarIndicatorSize
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.
- kSelectChipBarHeight → const double
- Default height of the single-row SelectChipBar.
- kSelectExpansionTileAnimationDuration → const Duration
- kSelectListTileHeight → const double
- Default height for SelectListTile.
- kSelectSideBarWidth → const double
- Default width for the SelectSideBar.
Functions
-
defaultSelectSearchPredicate(
SelectEntry entry, String query) → bool -
The default search predicate: case-insensitive substring match on
SelectEntry.name. Returns
truewhen the name containsquery. -
filterEntriesForSearch(
List< SelectEntry> entries, String query, {SelectSearchPredicate? predicate}) → List<SelectEntry> -
Filters
entriesfor the givenquery, preserving the original tree structure. -
resolveSelectChipBarStyle(
BuildContext context, {SelectChipVariant? variant, Color? backgroundColor, EdgeInsetsGeometry? padding, Color? chipColor, Color? selectedChipColor, TextStyle? labelStyle, TextStyle? selectedLabelStyle}) → SelectChipBarStyle -
Resolves the chip visual configuration through the standard three-level
fallback chain: widget parameter -> surrounding SelectChipBarTheme ->
SelectChipBarDefaults(derived from the surrounding SelectTheme). -
showModalBottomSelect(
{required BuildContext context, required SelectDelegate delegate, bool isScrollControlled = 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, 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
parentIdand 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
-
OnChanged<
T extends SelectEntry> = dynamic Function(int index, T entry) - Generic callback invoked when an item in a select view changes.
- 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 selected SelectEntry values.
-
SelectIntEntry<
E> = SelectRangeEntry< int, E> - Convenience alias for an integer range entry.
- SelectItemBuilder = Widget Function(BuildContext context, SelectEntry entry, {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
entrymatchesquery. - SkeletonBuilder = Widget Function(BuildContext context)
- Builds a skeleton widget while select data is loading.
- ToggleWidgetBuilder = Widget Function(BuildContext context, bool selected)
- Builds a custom toggle widget (radio/checkbox).