APISchemaObject.map constructor

APISchemaObject.map({
  1. APIType? ofType,
  2. APISchemaObject? ofSchema,
  3. bool any = false,
})

Implementation

APISchemaObject.map(
    {APIType? ofType, APISchemaObject? ofSchema, bool any: false})
    : type = APIType.object {
  if (ofType != null) {
    additionalPropertySchema = APISchemaObject()..type = ofType;
  } else if (ofSchema != null) {
    additionalPropertySchema = ofSchema;
  } else if (any) {
  } else {
    throw ArgumentError(
        "Invalid 'APISchemaObject.map' with neither 'ofType', 'any' or 'ofSchema' specified.");
  }
}