MultiTracker class final

A QoraTracker that fans out every hook call to a list of child trackers.

Use MultiTracker when you need two DevTools surfaces active at the same time, for example the IDE extension (VmTracker) and the in-app overlay (OverlayTracker):

final overlay = OverlayTracker();
final client  = QoraClient();

if (kDebugMode) {
  QoraDevtools.setup(client, additionalTrackers: [overlay]);
}

runApp(QoraInspector(tracker: overlay, child: MyApp(client: client)));

needsSerialization

Returns true as soon as any child tracker requires serialization. This keeps the core fetch path cheap when all trackers are NoOpTracker, while enabling the JSON step the moment a single DevTools tracker is live.

Ordering

Hooks are dispatched in list order. If a tracker throws, subsequent trackers in the list will not be called for that event. In practice, all built-in trackers are exception-safe, so ordering only matters for deterministic testing.

Dispose

dispose is forwarded to every child. After disposal, the child list is cleared to release references.

Implemented types

Constructors

MultiTracker(List<QoraTracker> trackers)
Creates a tracker that dispatches to all trackers.

Properties

hashCode → int
The hash code for this object.
no setterinherited
needsSerialization → bool
true when at least one child tracker requires data serialization.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Called when the owning QoraClient is disposed.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCacheCleared() → void
Called when QoraClient.clear removes all entries from the cache.
override
onMutationSettled(String id, bool success, Object? result) → void
Called when a MutationController transitions to MutationSuccess or MutationFailure.
override
onMutationStarted(String id, String key, Object? variables) → void
Called when a MutationController transitions to MutationPending.
override
onOptimisticUpdate(String key, Object? optimisticData) → void
Called when QoraClient.setQueryData writes data directly to the cache (typically an optimistic update before the server confirms).
override
onQueryCancelled(String key) → void
Called when a fetch was cancelled via CancelToken and the query went back to its state from before the fetch.
override
onQueryFetched(String key, Object? data, dynamic status, {int? staleTimeMs, int? gcTimeMs, int observerCount = 0, int? retryCount, String? dependsOnKey}) → void
Called when the outcome of a query fetch becomes the query's state, and by a few debug writes.
override
onQueryFetching(String key) → void
Called when a fetch transitions to the Loading state, immediately before the async fetcher is invoked.
override
onQueryInvalidated(String key) → void
Called when QoraClient.invalidate marks a cache entry as stale.
override
onQueryMarkedStale(String key) → void
Called when QoraClient.markStale silently flags a cache entry stale.
override
onQueryRemoved(String key) → void
Called when QoraClient.removeQuery evicts a cache entry.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited