onEachIndexed method

Map<K, V> onEachIndexed(
  1. void action(
    1. int index,
    2. MapEntry<K, V> entry
    )
)

Performs the given action on each entry, providing sequential index with the entry, and returns the Map itself afterwards.

Implementation

Map<K, V> onEachIndexed(
  void Function(int index, MapEntry<K, V> entry) action,
) {
  entries.onEachIndexed(action);

  return this;
}