flatMapNotNull<R extends Object> method
flatMap that discards nulls from the produced iterables.
['hello', 'hi', 'world']
.flatMapNotNull((s) => [s.startsWith('h') ? s.toUpperCase() : null]);
// ('HELLO', 'HI')
Implementation
Iterable<R> flatMapNotNull<R extends Object>(
Iterable<R?> Function(T) transform,
) => expand(transform).whereType<R>();