getRecent method
Returns the frame at index positions ago (0 = most recent).
Implementation
FrameEntry? getRecent(int index) {
if (index >= _size || index < 0) return null;
final idx = (_head + _size - 1 - index) % capacity;
return _buffer[idx];
}