flatten method
Flattens one level of nesting into a single list.
Example:
[[1, 2], [3, 4]].flatten(); // [1, 2, 3, 4]
Implementation
List<E> flatten() => <E>[for (final Iterable<E> inner in this) ...inner];
Flattens one level of nesting into a single list.
Example:
[[1, 2], [3, 4]].flatten(); // [1, 2, 3, 4]
List<E> flatten() => <E>[for (final Iterable<E> inner in this) ...inner];