vTableGet method

T vTableGet(
  1. BufferContext object,
  2. int offset,
  3. int field,
  4. T defaultValue,
)

Read the value of the given field in the given object.

Implementation

@pragma('vm:prefer-inline')
T vTableGet(BufferContext object, int offset, int field, T defaultValue) {
  int fieldOffset = _vTableFieldOffset(object, offset, field);
  return fieldOffset == 0 ? defaultValue : read(object, offset + fieldOffset);
}