items_selector 2.3.1
items_selector: ^2.3.1 copied to clipboard
A Flutter package providing flexible item selection widgets with support for multiple layouts including list, grid, wrap, radio button, and checkbox list selectors, allowing you to choose the perfect [...]
2.3.1 #
📝 Documentation #
- Fixed broken image links in
README.mdby replacing GitHub URLs with raw image links. - Ensured all widgets’ demo GIFs render correctly on pub.dev.
2.3.0 #
✨ New Features #
-
RadioSelectoradded! 🔘- A widget for single-selection radio button lists, using
RadioListTileunder the hood. - Supports a list of
RadioSelectorItemobjects, which extendRadioListTilefor individual customization. - Includes a
RadioSelectorOptionfor global styling and layout properties likespacingandmainAxisAlignment. - Features an
initialItemproperty for setting a default selection and a callback (OnSelectedRadioChanged) for handling selection changes.
- A widget for single-selection radio button lists, using
-
CheckBoxSelectoradded! ✅- A widget for multi-selection checkbox lists, using
CheckboxListTileunder the hood. - Accepts a list of
CheckBoxSelectorItemobjects, which extendCheckboxListTilefor individual customization. - Provides a
CheckBoxSelectorOptionfor global styling and layout properties likespacingandcrossAxisAlignment. - Supports an
initialItemsproperty for pre-selecting multiple items and a callback (OnSelectedCheckboxChanged) for tracking selected items and their indices.
- A widget for multi-selection checkbox lists, using
📌 Notes #
- No breaking changes.
- These new widgets expand the library’s selection capabilities, complementing existing widgets like
ListSelectorandGridSelector. - Safe to upgrade from
2.2.0without modifications to existing code.
2.2.0 #
✨ New Features #
ListSelector.wheeladded! 🎡- Uses
ListWheelScrollViewunder the hood. - Introduces
WheelConfiguration, allowing customization of properties such asitemExtent,squeeze,perspective, and more. - Unlike other
ListSelectorconstructors, it does not accept adirectionproperty sinceListWheelScrollViewdoes not have one.
- Uses
2.1.1 #
🛠 Fixed #
- Resolved an unused element warning in
GridSelector:- Fixed the warning: "The declaration 'GridSelector._' isn't referenced."
- Removed the unused private constructor declaration.
- No functionality was affected—this was purely an internal cleanup.
📌 Notes #
- No breaking changes.
- This update improves code cleanliness but does not impact functionality.
- Safe to upgrade from
2.1.0without modifications.
2.1.0 #
🚀 Added #
-
Generative constructor for
ListSelector:- Previously,
ListSelectorcould only be used viaListSelector.builderandListSelector.separated. - Now, the main constructor (
ListSelector()) is accessible. - This allows users to use
RoworColumnunder the hood based on thedirectionproperty.
- Previously,
-
New
flexConfigurationproperty forListSelector:ListSelector.builderandListSelector.separateduselistConfiguration(ListView-based).ListSelector()now usesflexConfiguration, which supports Row/Column properties like:mainAxisAlignmentcrossAxisAlignmentmainAxisSizetextDirectionverticalDirectiontextBaselineclipBehaviorspacing
🔄 Changed #
ListSelector.builderandListSelector.separatedstill work the same (usingListViewunder the hood).- The default behavior remains unchanged—developers can now choose between
ListViewandRow/Columnbased on their needs.
📌 Migration Notes #
- No breaking changes.
- If you prefer to use Row/Column, you can now use the new generative constructor and pass a
flexConfiguration. - If you are already using
ListSelector.builderorListSelector.separated, no changes are required.
2.0.0 #
🚀 Added #
- Introduced three new widgets:
ListSelector→ ReplacesSingleListItemSelector&MultiListItemSelector.GridSelector→ ReplacesSingleGridItemSelector&MultiGridItemSelector.WrapSelector→ ReplacesSingleWrapItemSelector&MultiWrapItemSelector.
ListSelectornow provides two named constructors:ListSelector.builder→ Builds a list of selectable items.ListSelector.separated→ Adds separators between list items.
GridSelectorintroduces three named constructors mirroring Flutter'sGridView:GridSelector.builderGridSelector.countGridSelector.extent
- All widgets now take a
SelectedOptionparameter, which accepts bothSingleSelectOptionsandMultiSelectOptions, offering a unified API. - Improved API consistency across all selectors, simplifying usability.
🔄 Changed #
ListSelectoralways usesListViewunder the hood instead of switching betweenRow/ColumnandListView.GridSelectoruses a sealed class configuration (GridConfiguration), requiring the correct subtype (BuilderConfiguration,CountConfiguration, orExtentConfiguration) for each named constructor.- Codebase refactored for better readability and maintainability.
⚠️ Migration Guide #
This update includes breaking changes that require adjustments to your existing code.
- Replace old widgets with new ones:
SingleListItemSelector→ListSelector.builderorListSelector.separatedMultiListItemSelector→ListSelector.builderorListSelector.separatedSingleGridItemSelector→GridSelector.builder,GridSelector.count, or *GridSelector.extent*MultiGridItemSelector→GridSelector.builder,GridSelector.count, or *GridSelector.extent*SingleWrapItemSelector→WrapSelectorMultiWrapItemSelector→WrapSelector
- Use the new
SelectedOptionparameter instead of separate selection options. - Ensure GridSelector uses the correct
GridConfigurationsubtype for its named constructors. ListSelector.separatedrequires an additionalseparatorBuilderparameter.
1.1.0 #
Added #
listConfigurationproperty introduced inSingleListItemSelector&MultiListItemSelector.- This allows users to switch from
Row/ColumntoListView, providing greater flexibility and access toListViewfeatures such as scrolling behavior, physics, controllers, and more. - If
listConfigurationis not provided, the default behavior remains unchanged.
- This allows users to switch from
Changed #
- Refactored codebase for better readability and maintainability. No functional changes were made.
- Updated example files to reflect recent improvements and demonstrate new capabilities.
Migration Notes #
- No breaking changes. Upgrading to this version will not cause any compilation errors or issues.
1.0.1 #
Fixed #
- Corrected the image URL in the README to properly display on pub.dev.
This update does not change any functionality but ensures that documentation is correctly presented to users.
1.0.0 #
Added #
- Introduced
SingleWrapItemSelectorandMultiWrapItemSelectorwidgets, providing flexible item arrangement using theWraplayout.
Changed #
- Removed default padding applied to all widgets to give users more control over layout spacing.
- Removed
SingleChildScrollViewfromSingleListItemSelectorandMultiListItemSelectorto avoid unintended scrolling behavior.
Fixed #
- General improvements to layout consistency and flexibility.
0.2.0 #
Changed #
- Refactored
SingleGridItemSelector&MultiGridItemSelector- Properties related to
GridView(such asgridDelegate,controller,physics, etc.) have been removed fromSingleGridItemSelectorandMultiGridItemSelectorand moved into a new class:GridConfiguration. - Both widgets now accept a
GridConfigurationinstance instead of multiple individual GridView-related properties.
- Properties related to
Added #
- New
GridConfigurationclass- Encapsulates all
GridViewconfiguration properties, makingSingleGridItemSelectorandMultiGridItemSelectorcleaner and more modular. - Simplifies the API by grouping all grid-related options into a single parameter.
- Encapsulates all
Migration Guide #
-
Instead of passing
gridDelegate,controller,physics, etc., directly toSingleGridItemSelectororMultiGridItemSelector, create aGridConfigurationinstance and pass it as a parameter.Before:
SingleGridItemSelector<int>( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2), padding: EdgeInsets.all(8), controller: ScrollController(), ... ) MultiGridItemSelector<int>( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3), padding: EdgeInsets.symmetric(horizontal: 16), controller: ScrollController(), ... )After:
SingleGridItemSelector<int>( gridConfiguration: GridConfiguration( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2), padding: EdgeInsets.all(8), controller: ScrollController(), ... ) ) MultiGridItemSelector<int>( gridConfiguration: GridConfiguration( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3), padding: EdgeInsets.symmetric(horizontal: 16), controller: ScrollController(), ... ) )
0.1.2 #
- Add examples
0.1.1 #
- Updated
README.mdfor better clarity.
0.0.1 #
- release initial version