mapIndexedNotNull<R> method
Returns an Iterable containing only the non-null results of applying the given transform function to each element and its index in the original collection.
Implementation
Iterable<R> mapIndexedNotNull<R>(
R? Function(int index, E element) transform,
) =>
withIndex
.map((indexedValue) => transform(
indexedValue.index,
indexedValue.value,
))
.whereNotNull;