Skip to main content

select_modal_flutter 1.0.0 copy "select_modal_flutter: ^1.0.0" to clipboard
select_modal_flutter: ^1.0.0 copied to clipboard

Flutter package to create a select field that opens its options in a modal window with search filter.

1.0.0 - 2026-10-14 #

BREAKING CHANGES #

  • ItemSelect is now generic (ItemSelect<T>) and requires value and label. Callbacks are strongly typed (ValueChanged<ItemSelect<T>> and ValueChanged<List<ItemSelect<T>>>).
  • The loose style parameters (boxDecoration, borderTextField, colorIcon, colorInputText, colorModal, colorItemTextModal, colorButtonSelect) are replaced by a single SelectModalStyle (a ThemeExtension).
  • bool? error is replaced by String? errorText.

Changed #

  • Refreshed UI: rounded modal with a bold header, a filled rounded search field, rounded option rows with a leading icon avatar and an animated check/circle indicator, plus a centered icon empty state.
  • Multi select modal now shows the current selection as removable chips, a "Select all / Clear" toolbar and a full-width confirm bar with the selected count (Confirm (3)).
  • Example app fully redesigned with a gradient hero, Material 3 theming and sectioned cards showcasing every feature.

Added #

  • Generic, strongly typed SelectModalFlutter<T> and MultiSelectModalFlutter<T> widgets plus a showSelectModal helper.
  • New SelectModalStyle fields: searchFieldFillColor, searchFieldBorderColor, searchFieldBorderRadius, titleTextStyle and optionIconBackgroundColor.
  • SelectModalStyle: pass it through style or register it in ThemeData.extensions for app-wide theming, with merge, copyWith and lerp support.
  • ItemSelect.subtitle, ItemSelect.icon and ItemSelect.enabled (disabled options are greyed out and cannot be selected); search also matches subtitle.
  • External controller and focusNode on the single select field.
  • Server-side search with asyncLoader (loading, error and retry states), searchDebounce (default 300 ms), onSearchChanged and searchMatcher.
  • Fully custom rows and empty states with itemBuilder and emptyBuilder.
  • SelectModalPresentation.bottomSheet to present the modal as a bottom sheet on both widgets.
  • Multi select: maxSelection, minSelection, onMaxSelectionReached, showSelectAll (selectAllText / clearText) and showSelectedCount (selectedCountText, "N selected").
  • Accessibility: ListTile.selected state, scrollToSelected on open, disabled field via enabled, a 48 dp confirm action with tooltip/semantic label (confirmText) and a chip remove action with a "Remove" semantic label and a larger hit area.
  • Modal UX: optional header with title and close (cancel) button (showModalTitle, showCloseButton, closeText), and configurable drag handle in bottom sheets (showDragHandle).
  • Translatable texts for i18n: emptyText, retryText, selectAllText, clearText, selectedCountText, confirmText.
  • Empty state ("No results found") and a clear button in the search field.
  • useRootNavigator (default true) and closeChipOnTap.
  • listItemSelect is optional when asyncLoader is provided.

Fixed #

  • Added the missing flutter_lints dependency (broken analysis_options.yaml).
  • ItemSelect now implements ==/hashCode, so the selection highlight works when lists are rebuilt.
  • onItemSelect is no longer called during initState; removed the setState() call inside initState.
  • Safe handling of items with a null label.
  • TextEditingController is disposed correctly and deprecated withOpacity was replaced with withValues.
  • Replaced hardcoded MediaQuery width math (broken on tablets/web) with a responsive layout and ListView.builder for long lists.
  • Search default text is now Search (was hardcoded Buscar).
  • README and example now compile.

Testing #

  • Unit/widget tests and a GitHub Actions CI workflow.

0.0.1 #

  • initial release.

0.0.2 #

  • add error validation.

0.0.3 #

  • add comments

0.1.1 #

  • add multiselect

0.1.2 #

  • fixed multiselect

0.1.3 #

  • fixed select

0.1.4 #

  • modify data type in model

0.1.5 #

  • send initial value

0.1.6 #

  • fixed send initial value

0.1.7 #

  • fixed send initial value multiselect

0.1.8 #

  • fixed send initial value multiselect

0.1.9 #

  • add colors to the dialog and select fields
1
likes
150
points
55
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter package to create a select field that opens its options in a modal window with search filter.

Repository (GitHub)
View/report issues

Topics

#select #dropdown #modal #form

License

MIT (license)

Dependencies

flutter

More

Packages that depend on select_modal_flutter