StructureExtensions extension

Extensions on DogStructures.

on

Properties

getters List<dynamic Function(dynamic)>

Available on DogStructure, provided by the StructureExtensions extension

Returns all field getters for this structure.
no setter

Methods

getClassValidator({DogEngine? engine, List<IsolatedFieldValidator>? fieldValidators}) IsolatedClassValidator

Available on DogStructure, provided by the StructureExtensions extension

Returns an IsolatedClassValidator that can be used to evaluate the ClassValidators and FieldValidators of this structure.
getFieldByName(String name) DogStructureField?

Available on DogStructure, provided by the StructureExtensions extension

Returns the first field with the supplied name or null if not found.
getFieldMap(dynamic obj) Map<String, dynamic>

Available on DogStructure, provided by the StructureExtensions extension

Returns all field values of the supplied obj as a field name keyed map. If a field defines a custom serial name, that name is used instead.
indexOfFieldName(String name) int?

Available on DogStructure, provided by the StructureExtensions extension

Returns the index of the field with the supplied name or null if not found.
instantiateFromFieldMap(Map<String, dynamic> map) → dynamic

Available on DogStructure, provided by the StructureExtensions extension

Reconstructs a new instance of T using the supplied map as field values. For more details on the map format, see getFieldMap. Throws an exception if a required field is missing.
metadataOf<T>() List<T>

Available on DogStructure, provided by the StructureExtensions extension

Returns all annotations of type T for this structure.
toDebugString(DogEngine? engine) String

Available on DogStructure, provided by the StructureExtensions extension

Returns a debug string representation of this structure.