CrystallisMixin class abstract mixin

Mixin class that provides validation functionality for data classes. Applied to classes generated with CrystallisData.

Constructors

CrystallisMixin()

Properties

hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, FieldMetadata>
Per-field metadata of this data class.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyFrom(CrystallisMixin other) → void
Copies compatible fields from any other instance of CrystallisMixin. Incompatible fields (missing or type-mismatched) are skipped. Null values are skipped.
get(String field) Object?
Get the value of a field by name. To see what type it might be, check metadata. (see FieldMetadata.type)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() Map<String, dynamic>
Serializes this object into a Map<String, dynamic>
set<T>(String field, T value) → void
Set the value of a field by name.
toString() String
A string representation of this object.
inherited
validate() Map<String, List<ValidationException>>
Validate all fields (including those with zero validators)
validateField(String field) List<ValidationException>
Validate a single field

Operators

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