A universal Flutter UI/UX inspector tool for runtime debugging
Inspect any UI element like Chrome DevTools - shows details on mobile screen and terminal
| Feature | Description |
|---|---|
| π Runtime Inspection | Inspect any UI element at runtime |
| π± Mobile Screen Details | See element properties directly on your phone |
| π» Terminal Output | Structured logging via dart:developer |
| π Debug Only | Only active in debug mode, no trace in release |
| π¨ Customizable Theme | Light and dark themes available |
| π§ Configurable | Enable/disable logging, button, etc. |
| π±οΈ Draggable Button | Move inspector button anywhere on screen |
| π― Real-time Hover | Element highlights as you move your finger |
# pubspec.yaml
dependencies:
flutter_inspector:
path: /path/to/flutter_inspectorflutter pub getimport 'package:flutter_inspector/flutter_inspector.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FlutterInspector(
child: MaterialApp(
home: YourApp(),
),
);
}
}flutter runThat's it! Inspector button will appear automatically in debug mode.
βββββββββββββββββββββββββββββββββββββββ
β Your App Content β
β β
β βββββββββββββββββββββββββββββββ β
β β Inspector Button (π) β β
β β - Draggable β β
β β - Tap to activate β β
β βββββββββββββββββββββββββββββββ β
β β
β When activated: β
β - Move finger to hover elements β
β - See tooltip with element name β
β - Tap to select and see details β
β β
βββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
β Your App Content β
β β
β (No inspector, no button, no code) β
β β
βββββββββββββββββββββββββββββββββββββββ
When you inspect an element, you'll see:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Flutter Inspector - Element Details β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Widget: Container
β Key: null
β Type: RenderDecoratedBox
β Size: 375.0 Γ 812.0
β Position: (0.0, 0.0)
β Constraints: BoxConstraints(w=375.0, h=812.0)
β Color: Color(0xFF2196F3)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FlutterInspector(
config: InspectorConfig(
enabled: true, // Enable/disable inspector
showButton: true, // Show/hide floating button
enableLogging: true, // Enable/disable terminal logging
theme: InspectorTheme.dark, // Use dark theme
),
child: MyApp(),
)| Option | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
true |
Enable/disable inspector |
showButton |
bool |
true |
Show/hide floating button |
enableLogging |
bool |
true |
Enable/disable terminal logging |
theme |
InspectorTheme |
InspectorTheme() |
Custom theme |
const InspectorTheme({
this.highlightColor = const Color(0x332196F3),
this.borderColor = const Color(0xFF2196F3),
this.buttonColor = const Color(0xFF2196F3),
this.panelBackground = const Color(0xFF1E1E1E),
this.panelHeaderColor = const Color(0xFF2D2D2D),
this.textColor = const Color(0xFFFFFFFF),
this.labelColor = const Color(0xFFB0B0B0),
this.borderWidth = 2.0,
this.buttonSize = 56.0,
this.borderRadius = 8.0,
})import 'package:flutter_inspector/flutter_inspector.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return FlutterInspector(
child: MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('My App')),
body: Center(child: Text('Hello World')),
),
),
);
}
}FlutterInspector(
config: InspectorConfig(
theme: InspectorTheme.dark,
),
child: MyApp(),
)FlutterInspector(
enabled: false,
child: MyApp(),
)// Enable inspector
FlutterInspector.enable();
// Disable inspector
FlutterInspector.disable();
// Check status
final status = getInspectorStatus();
print('Inspector: ${status['status']}');cd your_flutter_project
/path/to/flutter_inspector/check_inspector.shimport 'package:flutter_inspector/flutter_inspector.dart';
void main() {
// Check inspector status
final status = getInspectorStatus();
print('Inspector Status: $status');
// Print detailed status
printInspectorStatus();
runApp(MyApp());
}| Mode | Inspector Status | Button Visible | Logging Active |
|---|---|---|---|
Debug (flutter run) |
β Active | β Yes | β Yes |
Release (flutter build) |
β Not included | β No | β No |
# Debug mode - Inspector active
flutter run
# Release mode - Inspector removed
flutter build apk
flutter build iosflutter_inspector/
βββ lib/
β βββ flutter_inspector.dart # Main export file
β βββ src/
β β βββ inspector_overlay.dart # Main overlay widget
β β βββ inspector_service.dart # Terminal logging
β β βββ inspector_theme.dart # Custom themes
β β βββ inspector_config.dart # Configuration
β βββ widgets/
β βββ inspector_button.dart # Draggable floating button
β βββ highlight_border.dart # Element highlight
β βββ element_details_card.dart # Details panel
βββ example/
β βββ main.dart # Demo app
βββ check_inspector.sh # Check script
βββ pubspec.yaml
βββ README.md
- Position: Start at top-left, drag anywhere
- Tap: Activate inspection mode
- Drag: Move without activating
- Visual: Circle with search icon
- Hover: Move finger to highlight elements
- Tooltip: Shows element name and size
- Border: Blue border around hovered element
- Tap: Select highlighted element
- Details Panel: Shows at bottom with:
- Widget type
- Size (width Γ height)
- Position (x, y)
- Constraints
- Padding
- Color
- Close: Tap close button to deselect
- Format: Structured with borders
- Content: Widget type, size, position, properties
- Library:
dart:developerfor structured logging
Solution: Make sure you're running in debug mode
flutter runSolution: Try tapping directly on the element
Solution: Check if logging is enabled
FlutterInspector(
config: InspectorConfig(
enableLogging: true,
),
child: MyApp(),
)See CONTRIBUTING.md for details.
MIT License - See LICENSE for details.
Created with β€οΈ for the Flutter community