dropdown_flutter 1.2.1
dropdown_flutter: ^1.2.1 copied to clipboard
A Flutter package designed to enhance your app with customizable dropdowns, featuring list data search, network search, and multi-selection.
1.2.1 #
Fixed
- The listener attached to an app-supplied
SingleSelectController/MultiSelectControllerininitStateis now removed indispose. Previously it outlived the widget, so the next value change calledFormFieldState.didChange->setStateon an unmounted state and crashed with "Null check operator used on a null value", after first runningonChangedfor a screen that no longer existed. - Swapping in a different controller instance via
didUpdateWidgetnow moves the listener to the new controller. Previously the listener stayed on the old instance, silently disablingonChanged, formdidChangeandvalidateOnChangefrom then on. - The listener bodies guard on
mounted(and the form field'smounted), so a notification arriving mid-teardown cannot touch a dead state. - The post-frame writes for
initialItem/initialItemschanges skip when the state was disposed before the frame ended.
Covered by test/listener_lifecycle_test.dart, which reproduces the crash and
the stranded-listener cases.
1.2.0 #
Everything since 1.1.0 — 1.1.1 was prepared but never published, so its fixes ship here too.
Added
listItemHeightfor a fixed height on every dropdown row. Defaults to null, so rows keep sizing to their content unless a height is given. When set without grouped sections the list usesitemExtent, so the viewport no longer measures each child.CustomDropdownDecoration.copyWith, for deriving a variant from a shared base decoration without repeating every field.
Fixed
- Selected and keyboard-highlighted list rows used hardcoded light colors,
making them unreadable under a dark theme. They now derive from the ambient
ColorSchemewhen no explicitListItemDecorationcolor is given. - Replaced the deprecated
SizeTransition.axisAlignmentwithalignment, clearing the analyzer warning on Flutter 3.41+. - The README's search example named a
DropdownFlutterListFiltermixin that does not exist — the real name isCustomDropdownListFilter.
Docs and example
- Example app rebuilt with Material 3, per-demo cards and a light/dark toggle, then reworked around one realistic dataset (a team roster with avatars, roles and teams) so search, grouping and multi-select each demonstrate something concrete. Layout is centred and width-capped for tablets.
- Added a package logo, generated by
tool/build_logo.py, kept simple enough to stay legible at small sizes. - README rewritten: logo header with pub.dev score badges, install-first ordering, a constructor table, a labelled screenshot gallery and a full property reference, all expanded rather than hidden behind collapses.
- Added an Android integration-test suite and a scripted screenshot pipeline; regenerated all screenshots from the reworked example app.
1.1.0 #
Modern UX features — all opt-in and off by default, so existing usage is unaffected:
- Haptic feedback on open and selection (
enableHapticFeedback). - Keyboard navigation: arrow keys to move, Enter to select, Escape to close
(
enableKeyboardNavigation, plusListItemDecoration.highlightedColor). - Search-term highlighting in results (
highlightMatchedText, plusListItemDecoration.searchMatchTextStyle). - Grouped sections via
groupBy(with an optionalgroupHeaderBuilder). - Recent selections pinned at the top (
recentSelectionsMaxCount,initialRecentItems,onRecentItemsChanged). - Select-all / clear-all action row for multi-select (
showSelectAll,selectAllText,clearAllText). - Configurable open/close animation (
animationDuration,animationCurve). - Added widget tests for the new features and a "Modern UX" example tab.
1.0.0 #
- Highly Customizable dropdown widget released.
1.0.1 #
- Documentation updated.
1.0.2 #
- Bug fixes and performance improvements.
1.0.4 #
- Replaced deprecated
Color.withOpacitywithColor.withValuesfor forward compatibility with current Flutter. - Removed the stale
animated_custom_dropdownlibrary name declaration. - Upgraded
flutter_lintsand dev dependencies to their latest versions. - Added widget tests covering rendering, selection, and search filtering.
flutter analyzenow reports no issues.
1.0.3 #
- Updated to support latest Android (API 35) and iOS (13.0+) versions
- Updated Gradle to 8.10 and AGP to 8.7.2
- Updated Kotlin to 2.0.21
- Updated to Java 17
- Updated iOS deployment target to 13.0 and Xcode 16.0 support
- Fixed text glyph clipping issue in dropdown list items
- Performance improvements and build optimizations
