forEachKeyEntry method

void forEachKeyEntry(
  1. void cb(
    1. KeyEntry entry,
    2. int index
    )
)

Iterates over each key entry in the list.

The cb callback function is called for each key entry with the KeyEntry and its index.

Implementation

void forEachKeyEntry(void Function(KeyEntry entry, int index) cb) {
  for (int i = 0; i < length; i++) {
    cb(getEntryByIndex(i), i);
  }
}