zeba_academy_widget_diff_engine 0.0.1
zeba_academy_widget_diff_engine: ^0.0.1 copied to clipboard
A Flutter debugging tool to detect UI changes between widget rebuilds, compare widget trees, and visualize unnecessary rebuilds with a lightweight overlay.
zeba_academy_widget_diff_engine #
š A powerful Flutter debugging package to detect UI changes between widget rebuilds.
Analyze, visualize, and optimize your widget rebuilds with ease.
⨠Features #
- š Detect UI changes between rebuilds
- š³ Compare previous vs current widget tree
- šÆ Highlight changed widgets
- ā” Debug unnecessary rebuilds
- š Lightweight performance insights overlay
š¦ Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_widget_diff_engine: ^0.0.1
Then run:
flutter pub get
š Getting Started #
Wrap your app with WidgetDiffDebugger:
import 'package:flutter/material.dart';
import 'package:zeba_academy_widget_diff_engine/zeba_academy_widget_diff_engine.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
int counter = 0;
@override
Widget build(BuildContext context) {
return WidgetDiffDebugger(
child: MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text("Diff Engine")),
body: Center(
child: Text("Counter: $counter"),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
setState(() {
counter++;
});
},
child: const Icon(Icons.add),
),
),
),
);
}
}
š§ How It Works #
- Captures the current widget tree
- Stores the previous frame tree
- Compares both trees
- Detects differences
- Displays overlay with changes
āļø Configuration #
WidgetDiffDebugger(
enabled: true, // Enable/disable debugger
child: YourApp(),
)
ā ļø Important Notes #
- Intended for debug mode only
- Avoid using in production builds
- Widget tree traversal may impact performance
š£ Roadmap #
- šÆ Visual bounding box highlights
- šØ Color-coded diff (added/removed/updated)
- š Rebuild heatmap
- š§© Flutter DevTools integration
š License #
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
šØāš» About Me #
⨠Iām Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin
š Your all-in-one no-bloat hub! #
š Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! š»āØ
Zeba Academy is a learning platform dedicated to coding, technology, and development. ā” Visit our main site: https://zeba.academy ā” Explore hands-on courses: https://code.zeba.academy ā” YouTube: https://www.youtube.com/@zeba.academy ā” Instagram: https://www.instagram.com/zeba.academy/
Thank you for visiting! š