DeferredSyncGate<TKey> class

Defers one owner's structural diff across a live drag.

The gate answers two questions and nothing more: "may I sync now" (isDragging) and "do I still owe one" (isDeferred). Deciding which input changes owe a diff stays in the owner's didUpdateWidget.

Constructors

DeferredSyncGate({required TreeReorderController<TKey> reorderController, required bool isMounted(), required VoidCallback onSync})

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDeferred → bool
Whether the current input still owes a diff.
no setter
isDragging → bool
Whether a diff must not run right now.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach() → void
Starts watching drag-session transitions.
dispose() → void
Detaches from the controller; call before disposing the reorder controller. A post-frame callback already scheduled is NOT cancelled, because the scheduler offers no way to cancel one; it is guarded instead by the liveness and drag-generation checks inside the callback itself.
markDeferred() → void
Records that the current input has not been diffed yet.
markSynced() → void
Clears the bit after the owner synced on its own route, meaning its didUpdateWidget reached its sync call. The gate clears the bit itself when it drives the sync instead, so a caller never has to pair the two routes.
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