zeba_academy_list_utils 1.0.0
zeba_academy_list_utils: ^1.0.0 copied to clipboard
Generic list helper utilities for Dart and Flutter including chunking, partitioning, distinct values, flattening, safe indexing, rotation, and moving items.
Changelog #
All notable changes to zeba_academy_list_utils are documented in this file.
The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-08-13 #
🎉 Initial Release #
The first stable release of zeba_academy_list_utils.
Added #
- Added
ZebaListUtilsutility class. - Added generic list chunking with
chunk(). - Added list partitioning with
partition(). - Added duplicate removal with
distinct(). - Added key-based duplicate removal with
distinctBy(). - Added one-level iterable flattening with
flatten(). - Added safe index access with
elementAtOrNull(). - Added left list rotation with
rotateLeft(). - Added right list rotation with
rotateRight(). - Added arbitrary item movement with
move(). - Added
moveToStart()helper. - Added
moveToEnd()helper. - Added input validation for invalid chunk sizes.
- Added index validation for list movement operations.
- Added support for generic Dart types.
- Added null-safe APIs.
- Added comprehensive unit tests.
- Added public package exports.
- Added package-level API documentation.
- Added GPL-3.0 licensing.
Design #
- Transformation methods return new lists instead of modifying the original lists.
- Rotation operations normalize values larger than the list length.
distinct()preserves the first occurrence order.distinctBy()preserves the first item associated with each unique key.elementAtOrNull()safely returnsnullfor invalid indexes.chunk()supports incomplete final chunks.
Testing #
Added tests covering:
- Normal chunking.
- Exact-size chunking.
- Empty lists.
- Invalid chunk sizes.
- List partitioning.
- Distinct values.
- Distinct values by key.
- Nested iterable flattening.
- Valid and invalid list indexes.
- Left rotation.
- Right rotation.
- Large rotation values.
- Empty list rotation.
- Forward item movement.
- Backward item movement.
- Invalid movement indexes.
- Original list immutability.
- Moving items to the beginning.
- Moving items to the end.
Compatibility #
- Dart SDK:
^3.12.0 - Flutter compatible.
- No runtime dependencies.
Unreleased #
Added #
No changes yet.
Changed #
No changes yet.
Fixed #
No changes yet.
Deprecated #
No changes yet.
Removed #
No changes yet.
Security #
No changes yet.
Versioning Guidelines #
This package follows Semantic Versioning:
- MAJOR — Breaking API changes.
- MINOR — New backwards-compatible functionality.
- PATCH — Backwards-compatible bug fixes and improvements.
Examples:
1.0.0 → Initial stable release
1.1.0 → New backwards-compatible utilities
1.1.1 → Bug fix
2.0.0 → Breaking API change
License #
Copyright © 2026 Zeba Academy.
zeba_academy_list_utils is released under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for the complete license text.
Maintainer #
Sufyan bin Uzayr
- Website: https://sufyanism.com/
- Zeba Academy: https://zeba.academy/
- Zeba Academy Code: https://code.zeba.academy/