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 2024Releases
latest 53-
1.19.121 Oct 2024 -
1.19.013 Jun 2024Release notes
Open source →- Adds
shuffledtoIterableExtension. - Shuffle
IterableExtension.sampleresults. - Fix
mergeSortwhen the runtime iterable generic is a subtype of the static generic. CanonicalizedMap: added constructorfromEntries.- Mark "mixin" classes as
mixin. extension IterableIterableExtension<T> on Iterable<Iterable<T>>- Add
flattenedToListas a performance improvement overflattened. - Add
flattenedToSetas new behavior for flattening to unique elements.
- Add
- Deprecate
transitiveClosure. Consider usingpackage:graphs. - Deprecate
whereNotNull()fromIterableNullableExtension. UsenonNullsinstead - this is an equivalent extension available in Dart core since version 3.0. - Require Dart
^3.4.0
- Adds
-
1.18.026 Jul 2023Release notes
Open source →CanonicalizedMap:- Added methods:
copy: copies an instance without recalculating the canonical values of the keys.toMap: creates aMap<K,V>(with the original key values).toMapOfCanonicalKeys: creates aMap<C,V>(with the canonicalized keys).
- Added methods:
- Fixes bugs in
ListSlice.sliceandListExtensions.slice. - Update to
package:lints2.0.1.
-
1.17.212 May 2023 -
1.17.126 Jan 2023 -
1.17.014 Oct 2022Release notes
Open source →- Add
Iterable.elementAtOrNullandList.elementAtOrNullextension methods. - Add a top-level
lastBy()function that converts anIterableto aMapby grouping its elements using a function, keeping the last element for each computed key. Also available as an extension method onIterable.
- Add
-
1.16.008 Mar 2022Release notes
Open source →- Add an
Iterable.slicesextension method. - Add
BoolListclass for space-efficient lists of boolean values. - Use a stable sort algorithm in the
IterableExtension.sortedBymethod. - Add
min,max,minOrNullandmaxOrNullgetters toIterableDoubleExtension,IterableNumberExtensionandIterableIntegerExtension - Change
UnorderedIterableEqualityandSetEqualityto implementEqualitywith a non-nullable generic to allows assignment to variables with that type. Assignment toEqualitywith a nullable type is still allowed because of covariance. Theequalsandhashmethods continue to accept nullable arguments. - Enable the
avoid_dynamic_callslint.
- Add an
-
1.15.001 Feb 2021 -
1.15.0-nullsafety.503 Nov 2020 pre-releaseRelease notes
Open source →- Fix typo in extension method
expandIndexed. - Update sdk constraints to
>=2.12.0-0 <3.0.0based on beta release guidelines.
- Fix typo in extension method
-
1.15.0-nullsafety.423 Oct 2020 pre-releaseRelease notes
Open source →-
Allow prerelease versions of the
2.12.xsdk. -
Remove the unusable setter
UnionSetController.set=. This was mistakenly added to the public API but could never be called. -
Add extra optional
Randomargument toshuffle. -
Add a large number of extension methods on
IterableandListtypes, and on a few other types. These either provide easy access to the operations fromalgorithms.dart, or provide convenience variants of existingIterableandListmethods likesingleWhereOrNullorforEachIndexed.
-
-
1.15.0-nullsafety.322 Sep 2020 pre-releaseRelease notes
Open source →- Allow 2.10 stable and 2.11.0 dev SDK versions.
- Add
toUnorderedListmethod onPriorityQueue. - Make
HeapPriorityQueue'sremoveandcontainsmethods use==for equality checks. Previously usedcomparison(a, b) == 0as 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.
-
1.15.0-nullsafety.222 Jul 2020 pre-release -
1.15.0-nullsafety.117 Jul 2020 pre-release -
1.15.0-nullsafety09 Jul 2020 pre-releaseRelease notes
Open source →Pre-release for the null safety migration of this package.
Note that
1.15.0may not be the final stable null safety release version, we reserve the right to release it as a2.0.0breaking 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. -
1.15.0-nnbd08 Jul 2020 pre-releaseNothing published for this version
-
1.14.1319 Jun 2020Release notes
Open source →- Deprecate
mapMap. The Map interface has amapcall and map literals can use for-loop elements which supersede this method.
- Deprecate
-
1.14.1216 Aug 2019Release notes
Open source →- Fix
CombinedMapView.keys,CombinedMapView.length,CombinedMapView.forEach, andCombinedMapView.valuesto work as specified and not repeat duplicate items from the maps.- As a result of this fix the
lengthgetter now must iterate all maps in order to remove duplicates and return an accurate length, so it is no longerO(maps).
- As a result of this fix the
- Fix
-
1.14.1118 Jul 2018 -
1.14.1012 Jun 2018Release notes
Open source →- Fix the parameter names in overridden methods to match the source.
- Make tests Dart 2 type-safe.
- Stop depending on SDK
retypeand deprecate methods.
-
1.14.920 Mar 2018Release notes
Open source →- Fixed bugs where
QueueList,MapKeySet, andMapValueSetdid not adhere to the contract laid out byList.cast,Set.castandMap.castrespectively. The returned instances of these methods now correctly forward to the existing instance instead of always creating a new copy.
- Fixed bugs where
-
1.14.713 Mar 2018Release notes
Open source →- 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.
- Only the Dart 2 dev SDK (
-
1.14.606 Mar 2018Release notes
Open source →-
Make
DefaultEquality'sequals()andhash()methods take anyObjectrather than objects of typeE. This makesconst DefaultEquality<Null>()usable asEquality<E>for anyE, which means it can be used in a const context which expectsEquality<E>.This makes the default arguments of various other const equality constructors work in strong mode.
-
-
1.14.503 Jan 2018Release notes
Open source →- Fix issue with
EmptyUnmodifiableSet's stubs that were introduced in 1.14.4.
- Fix issue with
-
1.14.403 Jan 2018Release notes
Open source →- Add implementation stubs of upcoming Dart 2.0 core library methods, namely
new methods for classes that implement
Iterable,List,Map,Queue, andSet.
- Add implementation stubs of upcoming Dart 2.0 core library methods, namely
new methods for classes that implement
-
1.14.320 Jul 2017 -
1.14.207 Jul 2017 -
1.14.122 May 2017 -
1.14.026 Mar 2017Release notes
Open source →- 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.
- Add
-
1.13.019 Dec 2016 -
1.12.015 Nov 2016 -
1.11.001 Nov 2016Release notes
Open source →- Add
EqualityMapandEqualitySetclasses which useEqualityobjects for key and element equality, respectively.
- Add
-
1.10.131 Oct 2016 -
1.9.116 Aug 2016 -
1.9.023 Jun 2016Release notes
Open source →- Add a top-level
stronglyConnectedComponents()function that returns the strongly connected components in a directed graph.
- Add a top-level
-
1.8.025 May 2016Release notes
Open source →-
Add a top-level
mapMap()function that works likeIterable.map()on aMap. -
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 anIterableto aMapby grouping its elements using a function. -
Add top-level
minBy()andmaxBy()functions that return the minimum and maximum values in anIterable, respectively, ordered by a derived value. -
Add a top-level
transitiveClosure()function that returns the transitive closure of a directed graph.
-
-
1.7.013 May 2016 -
1.6.003 May 2016Release notes
Open source →-
Add a
UnionSetclass that provides a view of the union of a set of sets. -
Add a
UnionSetControllerclass that provides a convenient way to manage the contents of aUnionSet. -
Fix another incorrectly-declared generic type.
-
-
1.5.130 Mar 2016 -
1.5.029 Mar 2016Release notes
Open source →-
Add
DelegatingIterable.typed(),DelegatingList.typed(),DelegatingSet.typed(),DelegatingMap.typed(), andDelegatingQueue.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()andlowerBound()so they no longer require all arguments to be comparable. -
Add generic annotations to
insertionSort()andmergeSort().
-
-
1.4.126 Mar 2016Release notes
Open source →- Run
dart formatwith the new style. - Performance improvement for non-BMP characters.
- Run
-
1.4.027 Jan 2016Release notes
Open source →-
Add a
new PriorityQueue()constructor that forwards tonew HeapPriorityQueue(). -
Deprecate top-level libraries other than
package:collection/collection.dart, which exports these libraries' interfaces.
-
-
1.3.026 Jan 2016Release notes
Open source →-
Add
lowerBoundto binary search for values that might not be present. -
Verify that the is valid for
CanonicalMap.[].
-
-
1.2.020 Nov 2015Release notes
Open source →- Add string comparators that ignore ASCII case and sort numbers numerically.
-
1.1.317 Sep 2015 -
1.1.226 Aug 2015 -
1.1.107 May 2015 -
1.1.003 Nov 2014 -
1.0.026 Aug 2014Nothing published for this version
-
0.9.401 Jul 2014Release notes
Open source →- Add a
CanonicalizedMapclass that canonicalizes its keys to provide a custom equality relation.
- Add a
-
0.9.3+130 May 2014 -
0.9.229 Apr 2014Nothing published for this version
-
0.9.114 Jan 2014Nothing published for this version
-
0.9.019 Dec 2013Nothing published for this version