forEachKeyEntry method
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);
}
}