onEach method
Performs the given action
on each element and returns the collection
itself afterwards.
Implementation
Iterable<E> onEach(void Function(E element) action) {
for (final element in this) {
action(element);
}
return this;
}
Performs the given action
on each element and returns the collection
itself afterwards.
Iterable<E> onEach(void Function(E element) action) {
for (final element in this) {
action(element);
}
return this;
}