fast_immutable_collections 5.0.5
fast_immutable_collections: ^5.0.5 copied to clipboard
Immutable lists, sets, maps, and multimaps, which are as fast as their native mutable counterparts. Extension methods and comparators for native Dart collections.
5.0.5 - 2021-06-27 #
- MapOfSets.isEmptyForKey() and MapOfSets.isNotEmptyForKey().
5.0.4 - 2021-06-24 #
- Introduce the Predicate typedef.
5.0.2 - 2021-06-23 #
List.sortReversed()extension.
5.0.1 - 2021-05-24 #
-
Iterable.restrict()restricts some item to one of those present in this iterable. -
Reuse
ILists andISets only if they have the exact same generic type.
5.0.0 - 2021-05-24 #
-
Const
IList. Example:const IList<int> myList = IListConst([1, 2, 3]);Example of empty list:const IList<String> myList = IListConst([]); -
Const
ISet. Example:const ISet<int> mySet = ISetConst({1, 2, 3});Example of empty set:const ISet<String> mySet = ISetConst({}); -
Methods
IList.get(),IList.getOrNull()andIList.getAndMap(). -
Extensions
List.get(),List.getOrNull()andList.getAndMap(). -
Better NNBD for
divideListAsMap()andsortedLike(). -
Better Json serialization for NNBD.
-
Small IMapOfSets.fromIterable() improvement: added
ignoreparameter. -
Breaking change: Removed
empty()constructors fromIListandISet. You can create empty collections usingIList()andISet(), ormyIList.clear()andmyISet.clear(), orIList.withConfig(const [], myConfig)andISet.withConfig(const [], myConfig), orconst IListConst([])andconst ISetConst({}). -
Breaking change: Removed all extensions like
isNullOrEmptyand similar. This was a good idea before NNBD, but now if you use this Dart can't infer nullability anymore. -
Breaking change. Please, add
import "package:collection/collection.dart";to your project. I have removed a few methods, likeIterable.mapIndexed, because they are now present in thecollectionpackage.
4.0.6 - 2021-04-20 #
- Extension
List.withNullsRemoved().
4.0.5 - 2021-04-19 #
- The
contains()methods now acceptnull. - Method
toggle()now returns the correct bool.
4.0.4 - 2021-04-18 #
Iterable.isFirst,isNotFirst,isLastandisNotLast.
4.0.3 - 2021-04-16 #
-
Breaking change. Please, add
import "package:collection/collection.dart";to your project. I have removed the following methods because they are now present in thecollectionpackage:Iterable.firstwhereOrNullIterable.whereNotNull
-
Breaking change:
inRange()of nullable num now returns non-null, andorElseis not optional. -
Added
Iterable.mapNotNullextension. It's similar tomap, but returnsIterable<T>, whereTcan be a non-nullable type. This is equivalent tomappluscast, but has a better name when you are just using it to solve NNBD problems.
3.0.2 - 2021-04-14 #
-
Json serialization support for json_serializable with @JsonSerializable (for IList, ISet, IMap, ListSet, ListSetView).
-
Renamed extension
isNotNullOrZerotoisNotNullNotZero.
2.0.4 - 2021-04-12 #
- Factories
IList<T>.orNull(),ISet<T>.orNull(),IMap<K, V>.orNull(), andIMapofSets<K, V>.orNull(), that help implementcopyWithmethods.
2.0.2 2021/20/03 #
- Breaking changes:
Iterable.removeDuplicateswas renamed toIterable.whereNoDuplicatesto indicate it returns an Iterable.Iterable.removeNullswas renamed toIterable.whereNotNullto indicate it returns an Iterable.List.removeNullsnow is a List extension only. It mutates theList, removing nulls.List.removeDuplicatesnow is a List extension only. It mutates theList, removing all duplicates.Set.removeNullsnow is a Set extension only. It mutates theSet, removing all nulls.
2.0.1 - 2021-03-03 #
- Nullsafety improvements.
- isNotNullOrEmpty getter renamed to isNotNullNotEmpty.
- isEmptyButNotNull getter to isEmptyNotNull.
1.0.28 - 2021-02-09 #
- More efficient Iterable.sortedLike() and List.sortLike() extensions.
- Set.diffAndIntersect(), Iterable.everyIs() and Iterable.anyIs() extensions.
1.0.26 - 2021-01-28 #
- Better generics compatibility for
equalItemsAndConfig.
1.0.18 - 2021-01-19 #
IList.replace().ISet.difference(),intersection,unionnow accept iterables.
1.0.10 - 2021-01-18 #
areSameImmutableCollection()andareImmutableCollectionsWithEqualItems()functions.
1.0.9 - 2021-01-12 #
- Initial version.