flatMap<T> method

Stream<T> flatMap<T>(
  1. Iterable<T> callback(
    1. E element
    )
)

Maps each element of this Stream using a mapping function to zero or more elements, then flattens the result into a continuous stream.

This is an alias for Stream.expand.

Implementation

Stream<T> flatMap<T>(Iterable<T> Function(E element) callback) =>
    expand<T>(callback);