EntityCrud<T extends Object> class
Generated per-entity CRUD controller with isolated edits and optimistic graph feedback.
- Inheritance
-
- Object
- AnyNotifier<
EditBuffer, EditBuffer> - $Notifier<
EditBuffer> - EntityCrud
- Annotations
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
no setterinherited
- ref → Ref
-
The Ref associated with this notifier.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ EditBuffer
-
The value currently exposed by this notifier.
getter/setter pairinherited
- stateOrNull → EditBuffer?
-
The value currently exposed by this Notifier.
no setterinherited
-
toGraph
→ EntityEncoder<
T> ? -
no setterinherited
- type → String
-
no setterinherited
Methods
-
applyOptimistic(
) → void - Publish the current dirty fields through the graph patch layer.
-
build(
{required String type, required String id, EntityEncoder< T> ? toGraph}) → EditBuffer -
deleteEntity(
) → Future< void> - Delete optimistically and restore graph/list membership on failure.
-
edit(
String path, Object? value) → void - Update a field in the isolated edit buffer.
-
listenSelf(
void listener(EditBuffer? previous, EditBuffer next), {void onError(Object error, StackTrace stackTrace)?}) → RemoveListener -
Listens to changes on the value exposed by this provider.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
revert(
) → void - Discard pending edits and any explicitly applied optimistic patch.
-
runBuild(
) → WhenComplete? -
Executes Notifier.build.
inherited
-
save(
) → Future< T?> - Persist dirty fields, replacing optimistic data with server confirmation.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
EditBuffer previous, EditBuffer next) → bool -
A method invoked when the state exposed by this Notifier changes.
It compares the previous and new value, and return whether listeners
should be notified.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited