pendingHttpCountReader top-level property

int Function() pendingHttpCountReader
getter/setter pair

Reader for the live in-flight HTTP request count.

Defaults to a function that returns 0 so dusk runs without any HTTP observation layer wired up (the missing-telescope graceful path: the network is treated as continuously idle, so wait_for_network_idle returns immediately).

Hosts that ship fluttersdk_telescope wire the real source by writing:

pendingHttpCountReader = () => TelescopeStore.pendingHttpCount;

The indirection keeps dusk's pubspec free of a telescope dependency (pre-existing xml/image conflict in this repo blocks adding it as a path-dep) while letting the wait_for_network_idle handler still observe real network traffic when telescope is present.

Contract: set-once-per-isolate from MagicTelescopeIntegration.install(). Reset to () => 0 by MagicTelescopeIntegration.resetForTesting() so downstream tests asserting the missing-telescope default do not see leaked bindings.

Implementation

int Function() pendingHttpCountReader = () => 0;