flinq 0.3.0 copy "flinq: ^0.3.0" to clipboard
flinq: ^0.3.0 copied to clipboard

outdated

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 firstOrNull and method firstOrNullWhere(bool test(T)) for getting first value, and if it will not be found returns null
  • getter lastOrNull and method lastOrNullWhere(bool test(T)) for getting last value, and if it will not be found returns null
  • getter singleOrNull and method singleOrNullWhere(bool test(T)) for getting single value, and if it will not be found returns null, and if there will be too many elements it'll throw the StateError
  • method mapList, which maps collection and casts it to List
  • getter min and max for getting minimal or maximal value from collection of Comparables
  • getter sum and average for getting sum and average from collection of nums
  • getter distinct which will return List with unique values in collection
  • method union which will return List with union of two collections with only unique values in resulting collection
  • method intersection which will return List with elements that contains both collections with only unique values in resulting collection
  • method difference which will return List with 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
58
likes
0
pub points
81%
popularity

Publisher

verified publisherthisismarch.dev

Extended capabilities for collections. It's a bunch of shortcuts to avoid unnecesary boilerplate work with collections.

Homepage

License

unknown (license)

More

Packages that depend on flinq