OrbitMutation class
A single recorded mutation, produced by OrbitStore.mutate
and passed to every Orbit.observe
callback (and, in debug builds, to Orbit.changeLog).
Constructors
-
OrbitMutation({required OrbitStore store, required DateTime timestamp, required int listenerCount, String? action, Map<
String, Object?> ? before, Map<String, Object?> ? after, Object? error, StackTrace? errorStackTrace})
Properties
- action → String?
-
The label passed to
mutate(..., label: ...), if any.final -
after
→ Map<
String, Object?> ? -
Snapshot taken just after the mutation, if the store overrides
OrbitStore.snapshot.
final
-
before
→ Map<
String, Object?> ? -
Snapshot taken just before the mutation, if the store overrides
OrbitStore.snapshot.
final
-
diff
→ Map<
String, (Object?, Object?)> -
Just the fields that actually changed, as
field: (old, new). Empty if OrbitStore.snapshot wasn't overridden, or nothing actually changed.latefinal - error → Object?
-
Set if the mutation's action threw.
nullfor a mutation that completed successfully. A mutation is still recorded (and its listeners still notified) even when the action throws partway through, since state may have already changed before the error — this field is what lets Orbit.observe/Orbit.changeLog tell that case apart from a clean mutation instead of silently dropping it.final - errorStackTrace → StackTrace?
-
The stack trace paired with error, if any.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- listenerCount → int
-
How many widgets/listeners were subscribed to store at the time
of this mutation (via
OrbitBuilder,OrbitSelector,OrbitScope, or a manualaddListener). An approximation of "how many places will re-render" —OrbitSelectormay still skip an actual rebuild if its selected value didn't change.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → OrbitStore
-
The store instance that changed. Already reflects the new state
—
mutate()runs the mutation before building this object — so middleware (persistence, analytics) can just read live fields off it directly instead of relying on before/after.final - timestamp → DateTime
-
When this mutation was recorded.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited