like_devtool 1.0.0 copy "like_devtool: ^1.0.0" to clipboard
like_devtool: ^1.0.0 copied to clipboard

Developer tooling panel for the LIKE networking package. Debug-only bottom sheet with traffic inspector, logs, storage explorer, and feature flags. Production-safe: stripped at compile time in release builds.

like_devtool 🛠️ #

like_devtool is the official, premium, and production-safe developer tooling panel for the like networking ecosystem. It injects a highly responsive, draggable floating action button (FAB) into your Flutter application tree, opening a feature-rich, beautiful debug bottom sheet that empowers developers with real-time network, storage, caching, and logging insights.


⚡ 100% Production-Safe (Zero Overhead) #

like_devtool is architected with advanced build safety in mind.

  • By default, it detects kReleaseMode and short-circuits at compile time, completely stripping the devtool overlay, assets, controllers, and tracking code from your release binaries.
  • This guarantees zero runtime penalty, zero CPU overhead, and zero security risk of exposing internal endpoints, database keys, or feature flags to end-users in production.

🏗️ Deep Feature Ecosystem (7 Powerful Panels) #

like_devtool divides developer controls into 7 beautifully animated, context-rich panels:

graph TD
    Panel[LIKE DevTool Bottom Sheet] --> T1[Traffic Inspector 🌐]
    Panel --> T2[Hive Storage Explorer 💾]
    Panel --> T3[System Logs Console 📝]
    Panel --> T4[Encrypted Image Cache Monitor 🖼️]
    Panel --> T5[API Mocking Rule Manager 🎭]
    Panel --> T6[Feature Flags & Environments 🎛️]
    Panel --> T7[Device & Connection Metrics 📱]

1. Traffic Inspector 🌐 #

  • Real-time API Capture: Tracks active and completed REST, HTTP, or simulation request chains initiated by LikeClient.
  • Deep Inspect: Drill down into requests to inspect HTTP methods, status codes, query parameters, authorization headers, and raw JSON request/response payloads.

2. Storage Explorer 💾 #

  • Hive Database Viewer: Live connection to the local persistent Hive boxes (like_api_cache, like_offline_queue, like_cache_metadata, like_etags).
  • Active Entry Inspection: Browse and inspect key-value pairs representing stored cache results, expiration metadata, and active offline synchronization tasks.
  • One-Tap Flush: Instantly clear specific caching boxes to force live API updates during testing.

3. System Logs Console 📝 #

  • Internal Event Tracing: Stream and record internal logging output, warning diagnostics, custom developer events, and connectivity transition states.
  • Filter and Export: Filter logs in real-time to isolate networking warnings from pure layout logs.

4. Encrypted Image Cache Monitor 🖼️ #

  • Stats & Space Tracking: Real-time monitoring of disk storage utilized by the secure, AES-CBC 256-bit encrypted LikeCacheImage subsystem.
  • Total File Count & Active MB: See exactly how many items are currently cached and the total space on disk.
  • Manual Cache Purging: Erase local image caches with a single tap to trigger re-downloads and decrypt validations.

5. API Mocking Rule Manager 🎭 #

  • Visual Mocking Rules: View and toggle custom MockRules registered via the MockController.
  • API Simulation Control: Inspect which path patterns are being intercepted, simulate custom HTTP error statuses (e.g. 500, 429, 403), and preview simulated JSON payloads.

6. Feature Flags & Environments 🎛️ #

  • Runtime Env Switcher: Change app configurations between Development, Staging, and Production on the fly.
  • Debug-Only Flags: Toggle app-wide feature flags to test responsive layouts, feature gates, or connection loss simulations.

7. Device & Connection Metrics 📱 #

  • System Metrics: Visual tracking of live frame rendering rates (FPS), memory footprint (Current RSS), and connectivity status.
  • Network Identifiers: Quick-copy WiFi IP address and network speed indicators for immediate testing and routing debugging.

🛠️ Getting Started #

1. Add Dependencies #

Add like_devtool as a developer dependency (or regular dependency if you compile-guard dynamically):

dependencies:
  flutter:
    sdk: flutter
  like: ^1.1.1
  like_devtool: ^1.0.0

2. Initialize in Like Root Wrapper #

Pass the LikeDevTool as the devTool builder function argument inside the top-level Like wrapper:

import 'package:flutter/material.dart';
import 'package:like/like.dart';
import 'package:like_devtool/like_devtool.dart';

void main() {
  runApp(
    Like(
      baseUrl: 'https://api.example.com',
      getToken: () async => 'session_jwt_token',
      // Injects the devtool button and bottom sheet in debug/profile builds:
      devTool: (child) => LikeDevTool(child: child),
      child: const MyApp(),
    ),
  );
}

🎨 Premium Theme Customization #

like_devtool comes with a stunning UI built on high-contrast dark modes, glassmorphism, and hardware-accelerated layouts (utilizing SnapshotWidget to eliminate unnecessary UI layout and paint passes).

You can easily override the default dark teal theme using custom color palettes or our built-in preset configurations:

LikeDevTool(
  initialTheme: LikeDevToolThemeData.neonPurple, // Preset
  child: MyApp(),
)

Available Presets #

  • LikeDevToolThemeData.darkTeal (Default - sleek, premium modern dark)
  • LikeDevToolThemeData.amberGold (Warm, high-contrast, gold-accented)
  • LikeDevToolThemeData.neonPurple (Vibrant neon dark mode)
  • LikeDevToolThemeData.sakuraPink (Soft dark pink theme)
  • LikeDevToolThemeData.cleanLight (Impeccable, highly-scannable light mode)

Defining a Custom Color Palette #

Create your own LikeDevToolThemeData to align with your corporate brand:

const myBrandTheme = LikeDevToolThemeData(
  primary: Color(0xFF6366F1),        // Indigo
  background: Color(0xFF0B0F19),     // Deep Obsidian Navy
  cardBackground: Color(0xFF111827), // Midnight Gray
  inputBackground: Color(0xFF1F2937),// Slate Gray
  textColor: Colors.white,
);

LikeDevTool(
  initialTheme: myBrandTheme,
  child: MyApp(),
)

⚙️ Advanced Build Configurations #

Dynamic Environment Controls #

By default, the developer panel is enabled for all Debug and Profile builds, and fully compiled out in Release builds.

If you wish to force-include or force-exclude devtools in specific configurations, override the INCLUDE_DEVTOOLS compiler define during your flutter builds:

Force Enable in Release Builds (for private internal test flights)

flutter build apk --dart-define=INCLUDE_DEVTOOLS=true

Force Strip in Profile Builds (for pure performance benchmarking)

flutter build apk --profile --dart-define=INCLUDE_DEVTOOLS=false

🤝 Connect & Support #

Support the development or collaborate with us:

1
likes
0
points
272
downloads

Publisher

unverified uploader

Weekly Downloads

Developer tooling panel for the LIKE networking package. Debug-only bottom sheet with traffic inspector, logs, storage explorer, and feature flags. Production-safe: stripped at compile time in release builds.

Repository (GitHub)
View/report issues

Topics

#devtools #networking #debugging #flutter

License

unknown (license)

Dependencies

connectivity_plus, device_info_plus, flutter, hive, hive_flutter, like, network_info_plus, package_info_plus, path_provider

More

Packages that depend on like_devtool