Introducing Wind Kit Diagnostics Contracts 1.3.0
Read wind_kit state without depending on it.
Per-element widget state and process-wide counters for debug tools and AI agents, through one registry. No UI, no native code, no wind_kit in your build.
One registry. Two contracts.
wind_kit exposes its runtime state through small abstract contracts. A debug tool reads them, wind_kit fills them, and neither imports the other.
-
Per-element state
Ask the resolver about any
Learn more about Per-element stateElementfor itsclassName,breakpoint,brightness,platform,statesand colours. An element that is not wind_kit resolves to an empty map. -
Process-wide counters
Cache hits and misses, build counts per widget type and inherited reads, from
Learn more about Process-wide countersWindPerfResolver.stats(). -
One registry
Learn more about One registryWindDebugRegistryholds a debug slot and a perf slot. Both arenulluntil wind_kit installs its resolvers at boot. -
No wind_kit dependency
It depends on
Learn more about No wind_kit dependencyflutterandmetaonly, so a debug tool never pulls wind_kit into its build. An app that uses wind_kit already has it. -
Test with a fake
Learn more about Test with a fakeregisterForTestingputs a fake resolver in the debug slot andresetForTestingclears both slots, so a test needs no wind_kit. -
A stable 1.x contract
A new key is a minor release and a renamed or removed one is a major release, so a tool that reads the keys it needs keeps working.
Learn more about A stable 1.x contract
Add it in seconds
Or add to pubspec.yaml:
dependencies:
wind_kit_diagnostics_contracts: ^1.3.0
Or give your AI agent this prompt: