diff --git a/pkgs/dart_model/lib/src/json_buffer/closed_list.dart b/pkgs/dart_model/lib/src/json_buffer/closed_list.dart index 3812372..300472a 100644 --- a/pkgs/dart_model/lib/src/json_buffer/closed_list.dart +++ b/pkgs/dart_model/lib/src/json_buffer/closed_list.dart @@ -56,11 +56,8 @@ class _ClosedList with ListMixin { @override Object? operator [](int index) { RangeError.checkValidIndex(index, this); - final iterator = _ClosedListIterator(_buffer, _pointer, length); - for (var i = -1; i != index; ++i) { - iterator.moveNext(); - } - return iterator.current; + final pointer = _pointer + _lengthSize + index * ClosedLists._valueSize; + return _buffer._readAny(pointer); } @override