Flutter Debug Tools
A set of interactive, in-app tools for diagnosing UI and performance issues in Flutter apps—no external tooling required.
Features • Installation • Usage • License • Credits • Bugs or Requests
![]() |
![]() |
---|---|
Interactive Demo | Tools Menu |
Features
-
Performance Overlay:
Visualize FPS, frame rendering time, and rasterization metrics over your app’s UI. -
Device Details Overlay:
Instantly see device-specific information (model, OS version, screen size, and more) directly within your app. -
Debug Paint / Layout Guides:
Reveal widget boundaries, padding, alignments, and layout constraints with a single toggle. -
Layer Bounds Display:
Understand how Flutter composes layers by viewing layer boundaries in real-time. -
Debug Log Overlay:
Keep track of logs without attaching to an external console—logs appear right on top of your running app. -
Repaint Rainbow:
Easily detect frequent widget repaints. The overlay colors widgets differently each time they repaint, helping identify costly builds. -
Color Picker:
Tap on any pixel to grab its color value—perfect for UI fine-tuning and design validation. -
Screen Name Overlay:
Always know which route or screen is currently displayed, useful for debugging navigation flows.
No special IDEs or separate debug modes required—just integrate and toggle overlays as you run your app.
Installation
Add the following line to your pubspec.yaml
:
dependencies:
flutter_debug_tools: ^1.0.0
Then, run:
flutter pub get
Usage
import 'package:flutter/material.dart';
import 'package:flutter_debug_tools/flutter_debug_tools.dart';
void main() {
// (Optional) Initialize Loggy with the DebugLoggyPrinter to show logs in the Debug Log
Loggy.initLoggy(logOptions: LogOptions(), logPrinter: DebugLoggyPrinter());
runApp(MyApp());
}
// Wrap your material app with the `FlutterDebugTools` widget
return FlutterDebugTools(
builder: (context, showPerformanceOverlay, child) {
// (Optional) Attach navigatorObserver to observe the screen details
final DebugNavigatorObserver navigatorObserver = DebugNavigatorObserver();
return MaterialApp(
// Control performance overlay using [showPerformanceOverlay]
showPerformanceOverlay: showPerformanceOverlay,
home: MyHomePage(),
// Add `navigatorObservers` to observe the screen details
navigatorObservers: [navigatorObserver],
);
},
);
License
MIT License
Copyright (c) 2024 Abhay Maurya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Credits
This package uses the following open-source packages:
Bugs or Requests
- For bugs, please open an issue.
- For features or enhancements, submit a feature request.
- PRs are welcome—contributions help make this tool better!