fluttersdk_wind_diagnostics_contracts
Wind UI widget state contracts for Flutter debug-tooling and AI agents (MCP). Zero-dep abstract interface implemented in fluttersdk_wind, consumed in fluttersdk_dusk.
1.0.0
71K downloads/mo
#1275 most downloaded on pub.dev
fluttersdk/wind_diagnostics_contracts
What this package is like to depend on
Last release 3 months ago
21 May 2026
Too new to tell
only 1 dated releases
Nearly every release is documented
notes for 1 of 1 stable releases
Nothing withdrawn
no release was ever pulled
3 months old
1 releases · first in 2026
1 release in the last 12 months
see the full history below
Release timeline
1 releases · May 2026 to May 2026Releases
latest 1-
1.0.021 May 2026Release notes
Open source →Initial stable release. Neutral abstract contracts that let debug-tooling packages read Wind UI widget state at runtime without a compile-time dependency on
fluttersdk_wind.Added
-
WindDebugResolverabstract class (lib/fluttersdk_wind_diagnostics_contracts.dart): single-method interfaceMap<String, Object?> resolve(Element element). Implementations live influttersdk_wind(production) and test fakes (debug-only). The returned map's key set is documented as the v1 frozen contract:className:String(required when the widget is a W-prefixed widget with a non-emptyclassName).breakpoint:String(e.g.'sm','md','lg').brightness:String('light'or'dark').platform:String(e.g.'web','ios','android','macos').states:List<String>(e.g.['hover', 'focus']).bgColor:Stringhex (e.g.'#3B82F6'); present only when resolved.textColor:Stringhex; present only when resolved.
Implementations MUST returnconst {}for elements that are not Wind widgets, guaranteeing a graceful no-op for consumers walking arbitrary widget trees.
-
WindDebugRegistrystatic registry (lib/fluttersdk_wind_diagnostics_contracts.dart): process-global single-slot registration for the activeWindDebugResolver. Wind installs its concrete resolver at app boot (gated bykDebugMode) viaWind.installDebugResolver(); debug-tooling consumers look up the current resolver viaWindDebugRegistry.current. The registry exposes:WindDebugRegistry.currentgetter (returnsnullwhen no resolver is registered).WindDebugRegistry.register(resolver)(canonical install path; idempotent, most-recent-call wins).WindDebugRegistry.resetForTesting()andWindDebugRegistry.registerForTesting(resolver)(both@visibleForTesting; test-only seams).
-
6 contract tests (
test/fluttersdk_wind_diagnostics_contracts_test.dart): cover null-when-unregistered, register stores + lookup, idempotent register (last-wins),resetForTestingclears,registerForTestingoverrides, and the contract assertion that resolver implementations returnconst {}for non-Wind elements. -
GitHub Actions workflows (
.github/workflows/ci.yml,.github/workflows/publish.yml): CI runsflutter pub get+dart format --set-exit-if-changed+dart analyze+flutter test --coveragewith an 80% line-coverage floor +flutter pub publish --dry-run. Publish runs on a SemVer tag push, validates, performs the OIDC publish to pub.dev, then creates a GitHub Release whose body is extracted from this CHANGELOG.
Why this package
Wind UI exposes 6 widget-state fields (className, breakpoint, brightness, platform, states, bgColor, textColor) that debug-tooling packages such as
fluttersdk_duskneed to embed in their snapshot output. Shipping that handoff throughfluttersdk_wind's own surface would force every debug-tooling package to compile-time depend on Wind (heavy, transitively pulls Flutter's rendering surface), and would force Wind to compile-time depend on every debug-tooling package it wants to feed.This package breaks the loop. Both sides depend on the abstract contract here; neither side imports the other. The pattern mirrors Flutter's
*_platform_interfaceconvention (4.97M downloads onplugin_platform_interfaceas the canonical precedent). -