ZfaToggleIntent<T extends ZorphyEntityBase<Object?> , V> class
final
A typed toggle intent over one field of an entity T (v8, ZFA-008).
A ZfaToggleIntent names the entity's principal key id, the typed
ZorphyField to set, and the target value — the intent a store applies
through field.set(existing, value). It replaces the legacy untyped
ToggleParams, narrowing the field to the generated <Entity>Fields
descriptor and keeping the value strongly typed as V.
final toggle = ZfaToggleIntent<Product, bool>(
id: 'sku-1',
field: ProductFields.inStock,
value: true,
);
Constructors
-
ZfaToggleIntent({required String id, required ZorphyField<
T, V> field, required V value}) -
Creates a toggle intent for
fieldon the entity keyedid.const
Properties
-
field
→ ZorphyField<
T, V> -
The typed field to set.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The principal key of the entity to update.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → V
-
The target value for the field.
final
Methods
-
applyTo(
T target) → T -
Applies this intent to
target, returning a copy with field set to value. -
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