read method
Read the value at the given offset
in bc
.
Implementation
@override
@pragma('vm:prefer-inline')
List<int> read(BufferContext bc, int offset) {
final listOffset = bc.derefObject(offset);
final length = bc._getUint32(listOffset);
if (lazy) return bc._asInt8List(listOffset + _sizeofUint32, length);
final result = Int8List(length);
var pos = listOffset + _sizeofUint32;
for (var i = 0; i < length; i++, pos++) {
result[i] = bc._getInt8(pos);
}
return result;
}