AbstractType<T, B extends AbstractType<T, B>> class

Base class for type constraints based on a literal type. B the type type :-) T the literal type

Implementers

Constructors

AbstractType.new({required Type type})
Create a new AbstractType type the literal type

Properties

hashCode int
The hash code for this object.
no setterinherited
nullable bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tests List<Test>
getter/setter pair
type Type
getter/setter pair

Methods

baseType<V>(Type type) → void
check(dynamic object, ValidationContext context) → void
code() String
constraint(String input) → B
isValid(dynamic object) bool
return true, if the specified object is valid, else false object the to be validated object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optional() → B
parse(Map<String, MethodSpec> methods, String expression) → B
required() → B
test<S>({required Type type, required String name, required Check<S> check, dynamic params = const <String, dynamic>{}, dynamic stop = false, String? message}) → B
toString() String
A string representation of this object.
inherited
validate(dynamic object) → void
validate the passed object. In case of a type violation, a ValidationException will be thrown object the to be validated object.

Operators

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