Skip to content

sdegenaar/zenify_devtools_extension

Repository files navigation

Zenify DevTools Extension

A Flutter DevTools extension for Zenify that provides real-time inspection of scopes, queries, and dependencies.

Features

  • Scope Inspector: Visualize hierarchical scope tree with parent-child relationships
  • Query Cache Viewer: Monitor all active queries, their status, and cache times
  • Dependency Browser: Inspect controllers, services, and other dependencies in each scope
  • Metrics Dashboard: Track system-wide statistics and performance metrics

Installation

Add this as a dev dependency in your pubspec.yaml:

dev_dependencies:
  zenify_devtools_extension: ^1.0.0

Setup

1. Register Service Extensions

In your app's main() function, register Zenify service extensions:

import 'package:zenify/devtools/devtools.dart';

void main() {
  // Register Zenify DevTools service extensions
  Zen.init(registerDevTools: true);
  
  runApp(MyApp());
}

2. Enable DevTools Extension

Add this to your app's devtools_options.yaml (create it in your project root if it doesn't exist):

description: DevTools options for this project
extensions:
  - zenify_devtools_extension: true

3. Launch DevTools

Run your Flutter app in debug mode and open DevTools. You'll see a new "Zenify" tab with the extension.

Usage

Scope Inspector

Browse the hierarchical scope tree and see:

  • Scope names and IDs
  • Parent-child relationships
  • Dependencies registered in each scope (controllers, services, etc.)
  • Disposal status

Query Cache Viewer

Monitor all queries in your app:

  • Query keys and status (loading, success, error, stale)
  • Timestamps (last fetch, data age)
  • Error messages
  • Actions: Refetch, invalidate, or clear queries

Metrics Dashboard

View system-wide statistics:

  • Total scopes (active vs disposed)
  • Total controllers and services
  • Query statistics (total, loading, error, stale)
  • Performance metrics

Requirements

  • Flutter >=3.13.0
  • Dart >=3.11.0
  • Zenify ^1.8.0

Related Packages

  • zenify - Core state management library

Issues and Feedback

Please file issues at https://github.com/sdegenaar/zenify/issues

License

MIT License - see LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages