flinq 0.3.0
flinq: ^0.3.0 copied to clipboard
Extended capabilities for collections. It's a bunch of shortcuts to avoid unnecesary boilerplate work with collections.
flinq #
Extended capabilities for collections. It's a bunch of shortcuts to avoid unnecesary boilerplate work with collections.
Getting Started #
This package will help to reduce amount of boilerplate code by adding folowing extension for Iterables:
- getter
firstOrNulland methodfirstOrNullWhere(bool test(T))for getting first value, and if it will not be found returnsnull - getter
lastOrNulland methodlastOrNullWhere(bool test(T))for getting last value, and if it will not be found returnsnull - getter
singleOrNulland methodsingleOrNullWhere(bool test(T))for getting single value, and if it will not be found returnsnull, and if there will be too many elements it'll throw theStateError - method
mapList, which maps collection and casts it toList - getter
minandmaxfor getting minimal or maximal value from collection ofComparables - getter
sumandaveragefor getting sum and average from collection ofnums - getter
distinctwhich will returnListwith unique values in collection - method
unionwhich will returnListwith union of two collections with only unique values in resulting collection - method
intersectionwhich will returnListwith elements that contains both collections with only unique values in resulting collection - method
differencewhich will returnListwith difference between two collections with only unique values in resulting collection
Examples #
Will be added soon For now navigate to Examples section/folder
Milestones for next releases #
- Add notNull getter
- Add minWhere method
- Add maxWhere method
- Add minOrNullWhere method
- Add maxOrNullWhere method
- Add groupBy method