isBoxed property

bool get isBoxed

Whether this is boxed. This means the shape is optionally present and has no default value.

Implementation

bool get isBoxed {
  // V1
  if (hasTrait<BoxTrait>()) {
    return true;
  }
  // V2
  if (hasDefaultValue) {
    return false;
  }
  if (hasTrait<ClientOptionalTrait>()) {
    return true;
  }
  return isNotRequired;
}