APISchemaObject.array constructor

APISchemaObject.array({
  1. APIType? ofType,
  2. APISchemaObject? ofSchema,
})

Implementation

APISchemaObject.array({APIType? ofType, APISchemaObject? ofSchema})
    : type = APIType.array {
  if (ofType != null) {
    items = APISchemaObject()..type = ofType;
  } else if (ofSchema != null) {
    items = ofSchema;
  } else {
    throw ArgumentError(
        "Invalid 'APISchemaObject.array' with neither 'ofType' or 'ofSchema' specified.");
  }
}