Schema.fromJson constructor

Schema.fromJson(
  1. Object json, {
  2. SchemaResolver? resolver,
})

Creates a schema from any JSON Schema object or boolean schema.

Implementation

factory Schema.fromJson(Object json, {SchemaResolver? resolver}) =>
    (resolver ?? SchemaResolver(SchemasSingleton._definitions)).parseSchema(
      json,
    );