Google is committed to advancing racial equity for Black communities. See how.

validateEncoded method

void validateEncoded (int count, int data)

Implementation

void validateEncoded(int count, int data) {
  if (data == kAllocAbsent) {
    _throwIfNotNullable(nullable);
    _throwIfNotZero(count);
  } else if (data == kAllocPresent) {
    _throwIfExceedsLimit(count, maybeElementCount);
  } else {
    throw FidlError('Invalid vector encoding: $data.');
  }
}