PackageTrack
Sign in Get early access

collection

Collections and utilities functions and classes related to collections.

1.19.1 9.1M downloads/mo #43 most downloaded on pub.dev dart-lang/core

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 13 months

Nearly every release is documented

notes for 42 of 46 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

53 releases · first in 2013

0 releases in the last 12 months

see the full history below

Release timeline

53 releases · Dec 2013 to Oct 2024
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 53
  1. 1.19.1 21 Oct 2024
    Release notes
    • Move to dart-lang/core monorepo.
    Open source →
  2. 1.19.0 13 Jun 2024
    Release notes
    • Adds shuffled to IterableExtension.
    • Shuffle IterableExtension.sample results.
    • Fix mergeSort when the runtime iterable generic is a subtype of the static generic.
    • CanonicalizedMap: added constructor fromEntries.
    • Mark "mixin" classes as mixin.
    • extension IterableIterableExtension<T> on Iterable<Iterable<T>>
      • Add flattenedToList as a performance improvement over flattened.
      • Add flattenedToSet as new behavior for flattening to unique elements.
    • Deprecate transitiveClosure. Consider using package:graphs.
    • Deprecate whereNotNull() from IterableNullableExtension. Use nonNulls instead - this is an equivalent extension available in Dart core since version 3.0.
    • Require Dart ^3.4.0
    Open source →
  3. 1.18.0 26 Jul 2023
    Release notes
    • CanonicalizedMap:
      • Added methods:
        • copy: copies an instance without recalculating the canonical values of the keys.
        • toMap: creates a Map<K,V> (with the original key values).
        • toMapOfCanonicalKeys: creates a Map<C,V> (with the canonicalized keys).
    • Fixes bugs in ListSlice.slice and ListExtensions.slice.
    • Update to package:lints 2.0.1.
    Open source →
  4. 1.17.2 12 May 2023
    Release notes
    • Accept Dart SDK versions above 3.0.
    Open source →
  5. 1.17.1 26 Jan 2023
    Release notes
    • Require Dart 2.18.
    • Improve docs for splitAfter and splitBefore.
    Open source →
  6. 1.17.0 14 Oct 2022
    Release notes
    • Add Iterable.elementAtOrNull and List.elementAtOrNull extension methods.
    • Add a top-level lastBy() function that converts an Iterable to a Map by grouping its elements using a function, keeping the last element for each computed key. Also available as an extension method on Iterable.
    Open source →
  7. 1.16.0 08 Mar 2022
    Release notes
    • Add an Iterable.slices extension method.
    • Add BoolList class for space-efficient lists of boolean values.
    • Use a stable sort algorithm in the IterableExtension.sortedBy method.
    • Add min, max, minOrNull and maxOrNull getters to IterableDoubleExtension, IterableNumberExtension and IterableIntegerExtension
    • Change UnorderedIterableEquality and SetEquality to implement Equality with a non-nullable generic to allows assignment to variables with that type. Assignment to Equality with a nullable type is still allowed because of covariance. The equals and hash methods continue to accept nullable arguments.
    • Enable the avoid_dynamic_calls lint.
    Open source →
  8. 1.15.0 01 Feb 2021
    Release notes
    • Stable release for null safety.
    Open source →
  9. 1.15.0-nullsafety.5 03 Nov 2020 pre-release
    Release notes
    • Fix typo in extension method expandIndexed.
    • Update sdk constraints to >=2.12.0-0 <3.0.0 based on beta release guidelines.
    Open source →
  10. 1.15.0-nullsafety.4 23 Oct 2020 pre-release
    Release notes
    • Allow prerelease versions of the 2.12.x sdk.

    • Remove the unusable setter UnionSetController.set=. This was mistakenly added to the public API but could never be called.

    • Add extra optional Random argument to shuffle.

    • Add a large number of extension methods on Iterable and List types, and on a few other types. These either provide easy access to the operations from algorithms.dart, or provide convenience variants of existing Iterable and List methods like singleWhereOrNull or forEachIndexed.

    Open source →
  11. 1.15.0-nullsafety.3 22 Sep 2020 pre-release
    Release notes
    • Allow 2.10 stable and 2.11.0 dev SDK versions.
    • Add toUnorderedList method on PriorityQueue.
    • Make HeapPriorityQueue's remove and contains methods use == for equality checks. Previously used comparison(a, b) == 0 as criteria, but it's possible to have multiple elements with the same priority in a queue, so that could remove the wrong element. Still requires that objects that are == also have the same priority.
    Open source →
  12. 1.15.0-nullsafety.2 22 Jul 2020 pre-release
    Release notes

    Update for the 2.10 dev sdk.

    Open source →
  13. 1.15.0-nullsafety.1 17 Jul 2020 pre-release
    Release notes
    • Allow the <=2.9.10 stable sdks.
    Open source →
  14. 1.15.0-nullsafety 09 Jul 2020 pre-release
    Release notes

    Pre-release for the null safety migration of this package.

    Note that 1.15.0 may not be the final stable null safety release version, we reserve the right to release it as a 2.0.0 breaking change.

    This release will be pinned to only allow pre-release sdk versions starting from 2.9.0-dev.18.0, which is the first version where this package will appear in the null safety allow list.

    Open source →
  15. 1.15.0-nnbd 08 Jul 2020 pre-release

    Nothing published for this version

  16. 1.14.13 19 Jun 2020
    Release notes
    • Deprecate mapMap. The Map interface has a map call and map literals can use for-loop elements which supersede this method.
    Open source →
  17. 1.14.12 16 Aug 2019
    Release notes
    • Fix CombinedMapView.keys, CombinedMapView.length, CombinedMapView.forEach, and CombinedMapView.values to work as specified and not repeat duplicate items from the maps.
      • As a result of this fix the length getter now must iterate all maps in order to remove duplicates and return an accurate length, so it is no longer O(maps).
    Open source →
  18. 1.14.11 18 Jul 2018
    Release notes
    • Set max SDK version to <3.0.0.
    Open source →
  19. 1.14.10 12 Jun 2018
    Release notes
    • Fix the parameter names in overridden methods to match the source.
    • Make tests Dart 2 type-safe.
    • Stop depending on SDK retype and deprecate methods.
    Open source →
  20. 1.14.9 20 Mar 2018
    Release notes
    • Fixed bugs where QueueList, MapKeySet, and MapValueSet did not adhere to the contract laid out by List.cast, Set.cast and Map.cast respectively. The returned instances of these methods now correctly forward to the existing instance instead of always creating a new copy.
    Open source →
  21. 1.14.7 13 Mar 2018
    Release notes
    • Only the Dart 2 dev SDK (>=2.0.0-dev.22.0) is now supported.
    • Added support for all Dart 2 SDK methods that threw UnimplementedError.
    Open source →
  22. 1.14.6 06 Mar 2018
    Release notes
    • Make DefaultEquality's equals() and hash() methods take any Object rather than objects of type E. This makes const DefaultEquality<Null>() usable as Equality<E> for any E, which means it can be used in a const context which expects Equality<E>.

      This makes the default arguments of various other const equality constructors work in strong mode.

    Open source →
  23. 1.14.5 03 Jan 2018
    Release notes
    • Fix issue with EmptyUnmodifiableSet's stubs that were introduced in 1.14.4.
    Open source →
  24. 1.14.4 03 Jan 2018
    Release notes
    • Add implementation stubs of upcoming Dart 2.0 core library methods, namely new methods for classes that implement Iterable, List, Map, Queue, and Set.
    Open source →
  25. 1.14.3 20 Jul 2017
    Release notes
    • Fix MapKeySet.lookup to be a valid override in strong mode.
    Open source →
  26. 1.14.2 07 Jul 2017
    Release notes
    • Add type arguments to SyntheticInvocation.
    Open source →
  27. 1.14.1 22 May 2017
    Release notes
    • Make Equality implementations accept null as argument to hash.
    Open source →
  28. 1.14.0 26 Mar 2017
    Release notes
    • Add CombinedListView, a view of several lists concatenated together.
    • Add CombinedIterableView, a view of several iterables concatenated together.
    • Add CombinedMapView, a view of several maps concatenated together.
    Open source →
  29. 1.13.0 19 Dec 2016
    Release notes
    • Add EqualityBy
    Open source →
  30. 1.12.0 15 Nov 2016
    Release notes
    • Add CaseInsensitiveEquality.

    • Fix bug in equalsIgnoreAsciiCase.

    Open source →
  31. 1.11.0 01 Nov 2016
    Release notes
    • Add EqualityMap and EqualitySet classes which use Equality objects for key and element equality, respectively.
    Open source →
  32. 1.10.1 31 Oct 2016
    Release notes
    • Set.difference now takes a Set<Object> as argument.
    Open source →
  33. 1.9.1 16 Aug 2016
    Release notes
    • Fix some documentation bugs.
    Open source →
  34. 1.9.0 23 Jun 2016
    Release notes
    • Add a top-level stronglyConnectedComponents() function that returns the strongly connected components in a directed graph.
    Open source →
  35. 1.8.0 25 May 2016
    Release notes
    • Add a top-level mapMap() function that works like Iterable.map() on a Map.

    • Add a top-level mergeMaps() function that creates a new map with the combined contents of two existing maps.

    • Add a top-level groupBy() function that converts an Iterable to a Map by grouping its elements using a function.

    • Add top-level minBy() and maxBy() functions that return the minimum and maximum values in an Iterable, respectively, ordered by a derived value.

    • Add a top-level transitiveClosure() function that returns the transitive closure of a directed graph.

    Open source →
  36. 1.7.0 13 May 2016
    Release notes
    • Add a const UnmodifiableSetView.empty() constructor.
    Open source →
  37. 1.6.0 03 May 2016
    Release notes
    • Add a UnionSet class that provides a view of the union of a set of sets.

    • Add a UnionSetController class that provides a convenient way to manage the contents of a UnionSet.

    • Fix another incorrectly-declared generic type.

    Open source →
  38. 1.5.1 30 Mar 2016
    Release notes
    • Fix an incorrectly-declared generic type.
    Open source →
  39. 1.5.0 29 Mar 2016
    Release notes
    • Add DelegatingIterable.typed(), DelegatingList.typed(), DelegatingSet.typed(), DelegatingMap.typed(), and DelegatingQueue.typed() static methods. These wrap untyped instances of these classes with the correct type parameter, and assert the types of values as they're accessed.

    • Fix the types for binarySearch() and lowerBound() so they no longer require all arguments to be comparable.

    • Add generic annotations to insertionSort() and mergeSort().

    Open source →
  40. 1.4.1 26 Mar 2016
    Release notes
    • Run dart format with the new style.
    • Performance improvement for non-BMP characters.
    Open source →
    Release notes
    • Fix all strong mode warnings.
    Open source →
  41. 1.4.0 27 Jan 2016
    Release notes
    • Add a new PriorityQueue() constructor that forwards to new HeapPriorityQueue().

    • Deprecate top-level libraries other than package:collection/collection.dart, which exports these libraries' interfaces.

    Open source →
  42. 1.3.0 26 Jan 2016
    Release notes
    • Add lowerBound to binary search for values that might not be present.

    • Verify that the is valid for CanonicalMap.[].

    Open source →
  43. 1.2.0 20 Nov 2015
    Release notes
    • Add string comparators that ignore ASCII case and sort numbers numerically.
    Open source →
  44. 1.1.3 17 Sep 2015
    Release notes
    • Fix type inconsistencies with Map and Set.
    Open source →
  45. 1.1.2 26 Aug 2015
    Release notes
    • Export UnmodifiableMapView from the Dart core libraries.
    Open source →
  46. 1.1.1 07 May 2015
    Release notes
    • Bug-fix for signatures of isValidKey arguments of CanonicalizedMap.
    Open source →
  47. 1.1.0 03 Nov 2014
    Release notes
    • Add a QueueList class that implements both Queue and List.
    Open source →
  48. 1.0.0 26 Aug 2014

    Nothing published for this version

  49. 0.9.4 01 Jul 2014
    Release notes
    • Add a CanonicalizedMap class that canonicalizes its keys to provide a custom equality relation.
    Open source →
  50. 0.9.3+1 30 May 2014
    Release notes
    • Fix all analyzer hints.
    Open source →
  51. 0.9.2 29 Apr 2014

    Nothing published for this version

  52. 0.9.1 14 Jan 2014

    Nothing published for this version

  53. 0.9.0 19 Dec 2013

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive