flutter_api_inspector 0.3.4
flutter_api_inspector: ^0.3.4 copied to clipboard
Debug-first in-app HTTP inspector for Flutter mobile/desktop. Live timeline, route grouping, details, and QA force-enable support without proxy setup.
Changelog #
All notable changes to flutter_api_inspector are documented in this
file. The format follows Keep a Changelog
and the project adheres to Semantic Versioning.
Unreleased #
0.3.4 — 2026-08-06 #
Fixed #
- Inspector modal isolation: opening the overlay now clears any active
host-app
SnackBarso app notifications do not visually overlap the inspector panel. - Demo evidence: regenerated the demo GIF/screenshots after the SnackBar overlap fix.
0.3.3 — 2026-08-06 #
Changed #
- Overlay visual refresh: modernized the inspector with a single rounded floating surface, softer shadows, pill tabs, compact timeline controls, and cleaner route/endpoint cards that avoid visible nested background layers.
- Demo evidence: refreshed the recorded demo GIF and added current Timeline, Routes, and Endpoint panel screenshots from the real example Android app.
0.3.2 — 2026-08-04 #
Added #
- Demo GIF: added a real
assets/demo.gifrecorded from the example app, showing Home/Detail calls, the FAB, Timeline, Routes, and the route endpoint panel.
Fixed #
- pub.dev docs: updated README examples and limitations to match
version
0.3.2, the currentpanelMinHeightdefault, route endpoint drill-down behavior, and the debug-only status of route tooling in force-enabled QA builds. - Example route scopes: pass the example
MaterialAppdirectly toApiTrace.runAppso the Routes tab displays named/homeand/detailgroups in the visual demo.
0.3.1 — 2026-07-14 #
Fixed #
- README: the 0.3.0 README shipped without documenting the
Route-Scoped Network Inspector feature at all, still pointed the
Quickstart snippet at
^0.2.0, and had a markdown indentation bug that made the entire "Release-mode testing" section render as raw text/code on pub.dev instead of a proper section. Added a full "Route-Scoped Network Inspector" section (Routes tab,RouteScope,MaterialApp.routerwiring, manual-instrumentation tagging pattern), bumped the Quickstart version, fixed the indentation, and corrected the "no cURL export" limitation bullet (per-route export exists).
0.3.0 — 2026-07-14 #
Added #
- Route-Scoped Network Inspector: network calls are now grouped by the screen that triggered them. QA sees "CheckoutScreen → POST /orders (500) → GET /payment-methods (timeout)" instead of a flat timeline.
Fixed #
- pub.dev score: package description shortened to 166 chars (was 187, over the 180-char limit). Score back to 160/160.
Changed #
- README now includes a demo GIF placeholder showing the FAB → Timeline → Detail flow.
0.2.1 — 2026-07-06 #
- Fix pub.dev score: shorten package description to ~100 characters (was too long for pub.dev's 180-char limit).
0.2.0 — 2026-07-06 #
Added #
ApiTrace.forceEnabledflag: when set totruebeforeApiTrace.runApp(), the overlay works even in release builds. Useful for QA tester builds, custom flavors, or feature-flag-gated development modules. The threekDebugModeguards (runApp,ApiTraceBootstrap,ApiTraceOverlay) now use!kDebugMode && !forceEnabledso the harness and overlay are constructed when either debug mode or force-enabled is active.- The overlay now adopts the HOST app's colors: every surface token
derives from the app's
ColorScheme(Material 3 tonal surface roles), so the panel carries the app's primary tint instead of a fixed grey palette. - Contrast guarantee: accent, success/error, and HTTP-method colors
pass through
inspectorEnsureContrast, which nudges any low-contrast color toward black/white until it reaches WCAG 3.0 against the panel background — a pastel primary stays readable. - FAB polish: the icon is now the same bolt as the panel header,
colors come from the scheme's
primaryContainer/onPrimaryContainerpair, and a small error-colored dot appears when the timeline holds failed calls. - Panel close affordances: tapping outside the panel (scrim) or the new X button in the header closes it.
- Single-import barrel:
flutter_api_inspector.dartnow exportsTracedDioInterceptorandTracedHttpOverrides/TracedHttpClienttoo, so one import covers the whole package. The sub-path imports remain available. (The package targets mobile / desktop — web already has the browser Network tab.)
Fixed #
BootstrapMaterialAppHarnessalways forcesdebugShowCheckedModeBanner: falseso the debug-only overlay never adds an extra banner on top of the developer's own banner setting.ApiTrace.runAppcrashed real apps on startup with "The render object for Semantics cannot find ancestor render object to attach to" + "No MediaQuery widget ancestor found": it calledattachRootWidgetwithoutbinding.wrapWithDefaultView, so no rootView/RenderViewwas ever created (Flutter's ownrunApphas wrapped with the default View since 3.10). Both the debug and release paths now wrap correctly.BootstrapMaterialAppHarnessnow forwards EVERYMaterialAppconstructor property (routes,onGenerateRoute,initialRoute,onUnknownRoute, localization,scrollBehavior,shortcuts/actions, debug flags, …) instead of a small subset, composes the developer's ownbuilderwith the overlay, and supports router-based apps (MaterialApp.router). Activating the overlay no longer breaks routes-based navigation or localization.- Request bodies are now actually captured.
TracedHttpOverridesbuffers request bytes as they are written (capped atmaxResponseBodyBytes) andTracedDioInterceptorsnapshotsoptions.data/options.headersat request time.ApiTrace.calllifts the request payload intorecord.requestso the detail screen renders it (previouslyrecord.requestwas always null). - Installing
TracedHttpOverridesandTracedDioInterceptortogether no longer records every Dio call twice: the Dio interceptor defers to the overrides layer automatically (opt out withTracedDioInterceptor(deferToHttpOverrides: false)for custom adapters that bypassdart:io). - The timeline panel header badge now shows the FILTERED record count instead of the timeline total when an outcome filter or a name query is active.
- Doc comments in
detail.dart,config.dart, and the example claimed the default detail set was{minimal}; the actual default is{minimal, response}(aligned with the README).
Changed #
Timelineis now a true circular buffer:appendis O(1) with no element shifting (wasList.insert(0, …), O(n) per append).Timeline.recordsremains an unmodifiable, newest-firstList.- Minimum Flutter bumped to 3.27 / Dart 3.6: the code already used
Color.withValues(3.27+) and the theme now uses thesurfaceContainer*scheme roles (3.22+); the previous>=3.16constraint was never accurate.
0.1.0 — 2026-06-23 #
Added #
- Initial MVP release of
flutter_api_inspector. ApiTrace.call(name, method, url, execute, detailOverride, extra)— manual API capture with a privacy-conscious default ({ApiTraceDetail.minimal}only).ApiTrace.enabledmaster switch (defaults tokDebugModeat first read; mutable thereafter).ApiTrace.configglobal configuration withdetails,maxResponseBodyBytes(4 KB default),timelineCapacity(200 default),overlayPosition(4 values), andoverlayLabel(3 values).ApiTrace.timeline— in-memory ring buffer with newest-first ordering and silent eviction at capacity.ApiTrace.runApp(Widget app)— one-line bootstrap that mounts the overlay in debug mode and passes through torunAppin release.ApiTrace.showOverlay/ApiTrace.hideOverlay— programmatic overlay control.ApiTraceOverlaywidget with a configurable floating action button (position and label shape) and a panel that lists the timeline in chronological order with filter chips (success-only, error-only, name substring).ApiTraceDetailScreen— read-only detail view (no cURL export, no re-run, no export).kDebugModeguard at four call sites so the overlay is tree-shaken fromflutter build --releasebinaries.- Zero new third-party dependencies (only
flutterandflutter_test). - Strict TDD: every behavior-shipping change has RED → GREEN →
TRIANGULATE → REFACTOR evidence recorded in
openspec/changes/flutter_api_inspector-mvp/apply-progress.md.
Non-goals (explicit, in scope of v1 exclusion) #
- No auto-interceptor (no
http.Clientwrap, no Dio shim). - No disk persistence (no
shared_preferences, no SQLite, no file export). - No cURL export, no re-run, no replay.
- No network mocking, rewriting, or blocking.
- No multi-window / multi-tab support.
- No Flutter web support in v1.
- No regex / field-query search.
- No telemetry, no analytics, no auto-upload.