Schema<T> class

Describes valid values and decodes/encodes JSON.

Implementers

Constructors

Schema()
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
name String
Name of the type.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

acceptVisitor<R, C>(SchemaVisitor<R, C> visitor, C context) → R
checkTreeIsValid(Object argument, {List<Object> stack}) → void
decodeWith(SchemaBasedConverterBase visitor, Object argument) → T
encodeWith(SchemaBasedConverterBase visitor, T argument) Object
isInstance(Object value) bool
isValidSchema({List cycleDetectionStack}) bool
Determines whether the schema is valid. [...]
isValidTree(Object argument, {List cycleDetectionStack}) bool
Determines whether the argument matches the schema. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
selectTree(Object argument, {bool ignoreErrors = false}) → T
Select a tree in a graph.
toJson() Object
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

fromJson(Object json) Schema
fromValue(Object value, {List cycleDetectionStack}) Schema
Constructs a schema from a Dart tree.