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

validateEncoded method

void validateEncoded (int size, int data)

Implementation

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