peeky 0.0.4 copy "peeky: ^0.0.4" to clipboard
peeky: ^0.0.4 copied to clipboard

In-app network inspector for Flutter. Captures HTTP and Dio requests in a live, searchable panel. Tap or shake to open. Safe for production builds.

Peeky #

An in-app network request inspector for Flutter. Captures every HTTP request and response in real time and displays them in a scrollable, searchable panel — no desktop tools required.

Works with the http package and Dio. Safe to leave in release builds (just set enabled: false).

Screenshots #

Inspector main panel Request response detail

Features #

  • Live request/response log with status code, method, URL, headers and body
  • Filter by status class (2xx · 4xx · 5xx · errors)
  • Full-text search across all logs
  • One-tap cURL export for each request
  • Captures Flutter framework errors in a separate Errors tab
  • Draggable floating button to open the inspector — works on all platforms
  • Plug in any custom trigger stream (shake, keyboard shortcut, etc.)
  • Supports Android · iOS · macOS · Web · Windows · Linux

Getting started #

Add peeky to your pubspec.yaml:

dependencies:
  peeky: ^0.0.1

Usage #

1 — Wrap your app #

Place Peeky inside MaterialApp.builder and pass the same navigatorKey:

final _navKey = GlobalKey<NavigatorState>();

MaterialApp(
  navigatorKey: _navKey,
  builder: (context, child) => Peeky(
    navigatorKey: _navKey,
    child: child!,
  ),
  home: const HomeScreen(),
)

A small floating button will appear over your UI. Tap it to open the inspector panel.

2a — Capture requests with the http package #

import 'package:peeky/peeky.dart';
import 'package:http/http.dart' as http;

// Before
final client = http.Client();

// After — one-word change
final client = PeekyHttpClient(http.Client());

All requests made through client are now visible in the panel.

2b — Capture requests with Dio #

import 'package:peeky/peeky_dio.dart';

dio.interceptors.add(PeekyDioInterceptor());

Shake to open (optional, mobile only) #

The core package has no sensor dependency so it runs on all platforms. To restore shake-to-open on Android/iOS, add sensors_plus to your app's pubspec.yaml and wire it to triggerStream:

import 'dart:math';
import 'package:sensors_plus/sensors_plus.dart';

Peeky(
  navigatorKey: _navKey,
  showFloatingButton: false,          // hide the button when using shake
  triggerStream: accelerometerEventStream()
      .where((e) => sqrt(e.x * e.x + e.y * e.y + e.z * e.z) > 20)
      .map((_) => null),
  child: child!,
)

Disabling for production #

Peeky(
  enabled: kDebugMode,   // or your own FlavorConfig flag
  navigatorKey: _navKey,
  child: child!,
)

Additional information #

1
likes
160
points
138
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

In-app network inspector for Flutter. Captures HTTP and Dio requests in a live, searchable panel. Tap or shake to open. Safe for production builds.

Repository (GitHub)
View/report issues

Topics

#network #debugging #http #dio #inspector

License

MIT (license)

Dependencies

dio, flutter, http

More

Packages that depend on peeky