Zorphy class
- Implemented types
Constructors
-
Zorphy({List<
Type> ? explicitSubTypes = null, ZorphyPreset preset = ZorphyPreset.standard, ZorphyKind kind = ZorphyKind.entity, bool autoId = false, bool generateJson = false, bool explicitToJson = true, bool hidePublicConstructor = false, bool? generateCompareTo = null, bool nonSealed = false, bool? generateCopyWithFn = null, bool? generatePatch = null, bool? generateFilter = null, bool? generateCopyWith = null, bool? generatePropertyHelpers = null, bool? generateEqualsToString = null, bool? generateChangeTo = null, String? typeKey, String? subtypeWireValue, List<String> equalityExcludes = const []}) -
normal class; prepend class with a single dollar & make abstract
const
Properties
- autoId → bool
-
When true, the annotated class owns an automatically-generated
idfield: the concrete constructor'sidparameter is optional and defaults to a freshUuid().v4()value at construction time.final -
equalityExcludes
→ List<
String> -
Field names to exclude from
operator ==,hashCode,toJsonLean()andcompareToX(). Defaults to an empty list (no fields excluded — preserves the v1.x byte-for-byte output).final -
explicitSubTypes
→ List<
Type> ? -
if we want a copyWith (cwX) method for a subtype in this same class
final
- explicitToJson → bool
-
Returns whether to use explicitToJson in json_serializable.
final
- generateChangeTo → bool?
-
whether to generate changeTo conversion extensions for explicit
subtypes (null = inherit from preset)
final
- generateCompareTo → bool?
-
whether to generate compareTo extension methods
(null = inherit from preset)
final
- generateCopyWith → bool?
-
whether to generate copyWith methods (null = inherit from preset)
final
- generateCopyWithFn → bool?
-
if we want to generate function-based copyWith methods (copyWithFn)
(null = inherit from preset)
final
- generateEqualsToString → bool?
-
whether to generate ==, hashCode and toString
(null = inherit from preset)
final
- generateFilter → bool?
-
if we want to generate filter field descriptors
(null = inherit from preset)
final
- generateJson → bool
-
Returns whether JSON serialization code should be generated.
final
- generatePatch → bool?
-
if we want to generate patch methods and patch classes
(null = inherit from preset)
final
- generatePropertyHelpers → bool?
-
whether to generate semantic property helpers
(null = inherit from preset)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hidePublicConstructor → bool
-
final
- kind → ZorphyKind
-
The semantic kind of this class — ZorphyKind.entity (default) or
ZorphyKind.valueObject. See ZorphyKind for the semantics.
final
- nonSealed → bool
-
if we specify the class as an abstract class we make it abstract and not sealed
final
- preset → ZorphyPreset
-
How much code to generate. Defaults to ZorphyPreset.standard,
which reproduces zorphy 1.x output byte-for-byte.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtypeWireValue → String?
-
Custom wire value for this subtype in the base class's polymorphic
JSON dispatch. When null, the clean class name is used.
final
- typeKey → String?
-
Custom JSON key used for polymorphic type dispatch in
fromJsonandtoJson. When null, defaults to'__typename'.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited