NullableIterableExt<E> extension

Extension on nullable Iterable providing null-safe utility methods.

This extension adds convenient methods for working with nullable iterables, including null/empty checks, mapping, grouping, and conversion operations.

on

Properties

hasValue bool

Available on Iterable<E>?, provided by the NullableIterableExt extension

Returns true if this iterable is not null and not empty.
no setter
isNullOrEmpty bool

Available on Iterable<E>?, provided by the NullableIterableExt extension

Returns true if this iterable is null or empty.
no setter

Methods

group<GK>(GK groupKeyProvider(E item)) Map<GK, List<E>>

Available on Iterable<E>?, provided by the NullableIterableExt extension

Groups items in this iterable by keys provided by groupKeyProvider.
mapToList<R>(R mapperFunction(E item)) List<R>

Available on Iterable<E>?, provided by the NullableIterableExt extension

Maps this iterable to a List using mapperFunction.
mapToNullableList<R>(R mapperFunction(E item)) List<R>?

Available on Iterable<E>?, provided by the NullableIterableExt extension

Maps this iterable to a nullable List using mapperFunction.
toMap<K>(K keyProvider(E item)) Map<K, E>

Available on Iterable<E>?, provided by the NullableIterableExt extension

Converts this iterable to a Map using keyProvider to generate keys.