SchemaValidator class

Schema validator that can validate the JSON Theme objects while also being able to be extended to also perform validation against schemas that include JSON Theme objects.

Constructors

SchemaValidator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

enabled bool
Sets whether or not the validator is enabled globally or not. Set to false to disable validation across the entire application. This cannot be used to globally enable validation. Rather it can be used only to globally disable validation. A value of true can still be overridden by values passed to validate. But a value of false will ensure that validate always skips the validation.
getter/setter pair

Static Methods

validate({bool debugOnly = true, required String schemaId, bool throwException = false, required dynamic value, bool validate = true}) bool
Validates the given schemaId against the given value. If the optional validate parameter is not true then this will no-op and immediately return with true.