flat Map Not Null
inline fun <T, R> Flow<Flow<T>>.flatMapNotNull(crossinline mapper: suspend (T) -> R): Flow<R & Any>(source)
Transforms each inner Flow element using the given mapper function, flattens the result, and filters out null values.
Return
A Flow of non-null mapped and flattened elements
Parameters
mapper
A suspending function to transform each element
Type Parameters
T
The type of elements in the inner flows
R
The type of elements after applying the mapper
inline fun <T, R> Flow<Iterable<T>>.flatMapNotNull(crossinline mapper: suspend (T) -> R): Flow<R & Any>(source)
Transforms each element from inner Iterables using the given mapper function, flattens the result, and filters out null values.
Return
A Flow of non-null mapped and flattened elements
Parameters
mapper
A suspending function to transform each element
Type Parameters
T
The type of elements in the iterables
R
The type of elements after applying the mapper