SchemaDefinitionExt extension Null safety Extensions
Extension on the SchemaDefinition
class which provides a useful suite of methods
to work with the SchemaDefinition
class.
- on
Methods
-
newDocument(
String label) → SchemaDocument -
Converts a
SchemaDefinition
to a base SchemaDocument with its fields being set to the associatedSchemaKind
from the underlying definition. -
printToConsole(
) → void -
Prints the
SchemaDefinition
to the console. -
validate(
SchemaDocument doc) → bool -
Validates if all fields of the provided
doc
match theSchemaDefinition
fields.