mapMany<TRes> method
Maps each element of the Iterable to an Iterable<TRes> and flattens
the resulting iterables into a single Iterable<TRes>.
If the selector returns null for an element, it is ignored.
Implementation
Iterable<TRes> mapMany<TRes>(
Iterable<TRes>? Function(T item) selector,
) sync* {
for (var item in this) {
final res = selector(item);
if (res != null) yield* res;
}
}