JarSchema<T, Self extends JarSchema<T, Self>> class abstract

Implementers

Constructors

JarSchema()

Properties

asyncTests → List<Future<String?> Function(T? value, JarTestContext context)>
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
self → Self
no setter
tests → List<JarTest<T>>
final
transformers → List<JarValueTransformer<T>>
final
validators → List<JarCodedValidator<T>>
final

Methods

addValidator(JarValidator<T> validator, [String? code]) → Self
catchValue(T value) → Self
defaultTo(T value) → Self
describe() → Map<String, dynamic>
getAllValues() → Map<String, dynamic>?
getFieldValue(String fieldName) → T?
label(String label) → Self
meta(Map<String, dynamic> meta) → Self
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
test(JarTest<T> test) → Self
testAsync(Future<String?> test(T? value, JarTestContext context)) → Self
toString() → String
A string representation of this object.
inherited
transform(JarValueTransformer<T> transformer) → Self
validate(T? value, [Map<String, dynamic>? allValues, String? path, Object? root]) → JarResult
validateAll(T? value, [Map<String, dynamic>? allValues, String? path, Object? root]) → JarResult
validateAsync(T? value, [Map<String, dynamic>? allValues, String? path, Object? root]) → Future<JarResult>
when(String field, Map<dynamic, Self Function(Self)> conditions) → Self
whenFields(List<String> fields, Self builder(List values, Self schema)) → Self
whenFn(String field, Self builder(dynamic value, Self schema)) → Self

Operators

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