ispect 5.0.0-dev32 copy "ispect: ^5.0.0-dev32" to clipboard
ispect: ^5.0.0-dev32 copied to clipboard

Logging and inspector tool for Flutter development and testing

ISpect is a production-safe debugging toolkit for Flutter and Dart. It provides a visual debug panel, structured logging, network monitoring, database tracing, widget-tree inspection, and data redaction — all automatically stripped from release builds via compile-time tree-shaking.

Live web demo — drag and drop exported log files to explore them in the browser.

Preview #

ISpect desktop log viewer

Desktop log viewer and standalone web demo.

Inspector panel
Inspector
Render tree, layout, spacing, transforms.
Color picker
Color picker
Read on-screen colors and compare values.
JSON viewer
JSON viewer
Inspect structured payloads without leaving the app.
Share sheet
Export and share
Send sessions and logs for debugging or QA.
Mobile showcase
Settings panel Typography inspector on mobile Layout inspector on mobile Spacing inspector on mobile

Decoration inspector on mobile Transform inspector on mobile Effects inspector on mobile Alignment and margin inspector on mobile

Why ISpect? #

Most Flutter debug tooling ships in your binary. ISpect doesn't — when ISPECT_ENABLED isn't defined at compile time, the entire toolkit compiles to const-guarded no-ops and Dart's tree-shaker strips it from the release APK/IPA. Zero bytes in production.

Capability What it does
Zero-footprint builds Compile-time guard removes all code from release builds
Visual debug panel Draggable overlay with custom actions, badges, and the log viewer
Widget inspector Tap any widget to read its render box, decorations, constraints, and transforms
Structured logs Typed entries with levels, categories, filtering, history, and export/import
Network capture Request / response / error capture for Dio, http, and WebSocket clients
Database tracing Passive observability for any storage driver via a single dbTrace extension
BLoC observer Event / state / transition / error forwarding into the log pipeline
Automatic redaction Tokens, passwords, PII, and credit-card data masked before they reach logs
Observer hooks Forward log events to Sentry, Crashlytics, or any backend in real time
12 languages en, ru, kk, zh, es, fr, de, pt, ar, ko, ja, hi

The ISpect toolkit #

ISpect is a modular monorepo. Install only what your project needs — each package works independently.

Package What it does
ispect Flutter UI — debug panel, log viewer, navigation observer, inspector integration
ispect_layout Visual layout inspector — sizes, constraints, decorations, compare mode, color picker
ispectify Pure-Dart logging core — typed log entries, filtering, tracing, observers
ispectify_dio Dio HTTP interceptor with automatic redaction
ispectify_http http package interceptor with automatic redaction
ispectify_ws WebSocket traffic capture with automatic redaction
ispectify_db Database operation tracing (SQL, ORM, KV stores)
ispectify_bloc BLoC event / state / transition observer

Quick start #

dependencies:
  ispect: ^5.0.0-dev32
import 'package:flutter/material.dart';
import 'package:ispect/ispect.dart';

void main() {
  ISpect.run(() => runApp(const MyApp()));
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: ISpectLocalizations.delegates(),
      navigatorObservers: ISpectNavigatorObserver.observers(),
      builder: (_, child) => ISpectBuilder.wrap(child: child!),
      home: const HomePage(),
    );
  }
}
# Development — toolkit active.
flutter run --dart-define=ISPECT_ENABLED=true

# Release — toolkit removed via tree-shaking.
flutter build apk

For package-specific guides (Dio, http, WS, DB, BLoC, layout inspector) see the individual package READMEs linked in the table above.

Production safety #

ISpect is flag-gated — with zero footprint in release builds when ISPECT_ENABLED is not defined at compile time. ISpect.run(), ISpectBuilder, and ISpectLocalizations.delegates() become const-guarded no-ops and Dart's tree-shaker eliminates the entire toolkit.

# Development — toolkit active.
flutter run --dart-define=ISPECT_ENABLED=true

# Release — toolkit removed by the tree-shaker.
flutter build apk

For environment-aware control:

import 'package:flutter/foundation.dart';

class ISpectConfig {
  static const bool isEnabled = bool.fromEnvironment(
    'ISPECT_ENABLED',
    defaultValue: kDebugMode,
  );

  static const String environment = String.fromEnvironment(
    'ENVIRONMENT',
    defaultValue: 'development',
  );

  static bool get shouldInitialize => isEnabled && environment != 'production';
}

Measured impact on an obfuscated release APK (no --dart-define=ISPECT_ENABLED): 6 residual "ispect" strings vs. 276 in a development build. See ispect on pub.dev for the full production-safety guide.

Repository #

This repository is a monorepo containing every package above plus a standalone web-based log viewer, with shared tooling for versioning, publishing, and doc sync. See bash/README.md for the automation stack and docs/VERSION_MANAGEMENT.md for the release workflow.

Documentation workflow #

Each package README is generated from a per-package source in docs/readme/. Shared fragments (header, footer, install matrix, redaction block, production-safety block) live in docs/readme/_partials/. Regenerate with ./bash/build_readme.sh; verify in CI with ./bash/build_readme.sh --check. Do not edit packages/*/README.md by hand — edits are overwritten on the next build.

Contributing #

Contributions are welcome. See CONTRIBUTING.md for guidelines, and open issues or pull requests at the ISpect repository.

License #

MIT — see LICENSE.