DogStructureField class
The definition of a field in a DogStructure. Holds all necessary information to validate and serialize and introspect the field.
- Inheritance
-
- Object
- RetainedAnnotationHolder
- DogStructureField
- Implemented types
- Available extensions
Constructors
-
DogStructureField(TypeTree type, Type? converterType, String name, bool optional, bool structure, List<
RetainedAnnotation> annotations) -
Creates a new DogStructureField.
const
-
DogStructureField.bool(String name, {bool optional = false, IterableKind iterable = IterableKind.none, Type? converterType, List<
RetainedAnnotation> annotations = const []}) -
Creates a synthetic bool field.
factory
-
DogStructureField.double(String name, {bool optional = false, IterableKind iterable = IterableKind.none, Type? converterType, List<
RetainedAnnotation> annotations = const []}) -
Creates a synthetic double field.
factory
-
DogStructureField.int(String name, {bool optional = false, IterableKind iterable = IterableKind.none, Type? converterType, List<
RetainedAnnotation> annotations = const []}) -
Creates a synthetic int field.
factory
-
DogStructureField.string(String name, {bool optional = false, IterableKind iterable = IterableKind.none, Type? converterType, List<
RetainedAnnotation> annotations = const []}) -
Creates a synthetic String field.
factory
Properties
-
annotations
→ List<
RetainedAnnotation> -
final
- converterType → Type?
-
Optional converter type override.
final
- copy → DogStructureFieldCopyFrontend
-
Provides a fluent API to create modified copies of this field.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- iterableKind → IterableKind
-
The kind of iterable this field is.
no setter
- name → String
-
The name of the field.
final
- optional → bool
-
Defines the nullability of the field.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serial → TypeCapture
-
Returns the serial type of this field.
no setter
- structure → bool
-
Defines if the fields serial type is a structure.
final
- type → TypeTree
-
Declared type of the structure.
final
Methods
-
annotationsOf<
T> () → Iterable< T> -
Returns all annotations assignable to type
T.inherited -
annotationsOfExact<
T> () → Iterable< T> -
Returns all annotations with the exact type of
T.inherited -
findConverter(
DogStructure? structure, {DogEngine? engine, bool nativeConverters = false}) → DogConverter? -
Available on DogStructureField, provided by the FieldExtension extension
Returns the DogConverter the StructureHarbinger would use to convert this field. -
firstAnnotationOf<
T> () → T? -
Gets the first annotation of type
Tor returns null otherwise.inherited -
getFieldValidator(
{DogEngine? engine, FieldValidator? guardValidator}) → IsolatedFieldValidator -
Available on DogStructureField, provided by the FieldExtension extension
Returns an IsolatedFieldValidator that can be used to evaluate the FieldValidators of this field. -
metadataOf<
T> () → List< T> -
Available on DogStructureField, provided by the FieldExtension extension
Returns all annotations of typeTfor this field. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create<
TYPE> (String name, {bool optional = false, IterableKind iterable = IterableKind.none, Type? converterType, List< RetainedAnnotation> annotations = const []}) → DogStructureField - Creates a synthetic field for a terminal serial type.