- Const
IList
. Example:const IList<String> myList = IListConst.empty();
Example:const IList<int> myList = IListConst([1, 2, 3]);
- Extension
List.withNullsRemoved()
.
- The
contains()
methods now acceptnull
. - Method
toggle()
now returns the correct bool.
Iterable.isFirst
,isNotFirst
,isLast
andisNotLast
.
-
Breaking change. Please, add
import "package:collection/collection.dart";
to your project. I have removed the following methods because they are now present in thecollection
package:Iterable.firstwhereOrNull
Iterable.whereNotNull
-
Breaking change:
inRange()
of nullable num now returns non-null, andorElse
is not optional. -
Added
Iterable.mapNotNull
extension. It's similar tomap
, but returnsIterable<T>
, whereT
can be a non-nullable type. This is equivalent tomap
pluscast
, but has a better name when you are just using it to solve NNBD problems.
-
Json serialization support for json_serializable with @JsonSerializable (for IList, ISet, IMap, ListSet, ListSetView).
-
Renamed extension
isNotNullOrZero
toisNotNullNotZero
.
- Factories
IList<T>.orNull()
,ISet<T>.orNull()
,IMap<K, V>.orNull()
, andIMapofSets<K, V>.orNull()
, that help implementcopyWith
methods.
- Breaking changes:
Iterable.removeDuplicates
was renamed toIterable.whereNoDuplicates
to indicate it returns an Iterable.Iterable.removeNulls
was renamed toIterable.whereNotNull
to indicate it returns an Iterable.List.removeNulls
now is a List extension only. It mutates theList
, removing nulls.List.removeDuplicates
now is a List extension only. It mutates theList
, removing all duplicates.Set.removeNulls
now is a Set extension only. It mutates theSet
, removing all nulls.
- Nullsafety improvements.
- isNotNullOrEmpty getter renamed to isNotNullNotEmpty.
- isEmptyButNotNull getter to isEmptyNotNull.
- More efficient Iterable.sortedLike() and List.sortLike() extensions.
- Set.diffAndIntersect(), Iterable.everyIs() and Iterable.anyIs() extensions.
- Better generics compatibility for
equalItemsAndConfig
.
IList.replace()
.ISet.difference()
,intersection
,union
now accept iterables.
areSameImmutableCollection()
andareImmutableCollectionsWithEqualItems()
functions.
- Initial version.