forEach method
Apply given function callback
to all elements of the buffer
Implementation
void forEach(Function(T, int) callback, int? startIndex, int? beforeIdx) {
startIndex = startIndex ?? 0;
beforeIdx = beforeIdx ?? buffer.length;
for (var i = startIndex; i < beforeIdx; i++) {
callback(buffer[i], i);
}
}