Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kekland/inspector
A Flutter package for inspecting widgets.
https://github.com/kekland/inspector
dart flutter
Last synced: 4 months ago
JSON representation
A Flutter package for inspecting widgets.
- Host: GitHub
- URL: https://github.com/kekland/inspector
- Owner: kekland
- License: mit
- Created: 2021-10-22T14:32:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T06:49:55.000Z (over 1 year ago)
- Last Synced: 2024-08-01T12:25:44.403Z (7 months ago)
- Topics: dart, flutter
- Language: Dart
- Homepage:
- Size: 11.7 MB
- Stars: 49
- Watchers: 3
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# inspector
[](https://pub.dev/packages/inspector)
[](https://github.com/kekland/inspector/actions)
[](https://coveralls.io/github/kekland/inspector?branch=master)
[](https://github.com/kekland/inspector)
A Flutter package for inspecting widgets. Also comes with an eyedropper and a magnifying glass. Useful for debugging widgets and for QA testing.
Supports keyboard shortcuts if you're using a physical keyboard.
Check out the [example web app!](https://kekland.github.io/inspector/#/)
Inspired by [inspx](https://github.com/raunofreiberg/inspx).
## WIP
Warning, the development of this package is still in progress and some things may break your app.
## Features
- [x] Color picker
- [x] Size inspection
- [x] Padding inspection
- [x] Keyboard shortcuts
- [x] Zooming
- [ ] `BorderRadius` inspection
- [x] `TextStyle` inspection
## Installing
Add the dependency:
```bash
$ flutter pub add inspector
```Import the package:
```dart
import 'package:inspector/inspector.dart';
```Wrap `MaterialApp.builder` or `WidgetsApp.builder` with `Inspector`:
```dart
MaterialApp(
home: ExampleApp(),
builder: (context, child) => Inspector(child: child!), // Wrap [child] with [Inspector]
),
```Optionally, you can pass `isEnabled` to the `Inspector` to disable it. By default, the inspector is disabled when `kReleaseMode == true`.
## Usage
If the inspector is enabled, then a panel appears on the right side of the screen,
with buttons to toggle size inspection and the color picker.It's quite straightforward to use, just tap on the widget that you want to measure
or tap on the pixel to get its color.You can also use keyboard shortcuts - `Shift` will toggle the color picker, `Z` will toggle the zoom, and `Alt` or `Cmd` will toggle the widget inspector.
## Examples
![]()
![]()
## Contact me
Feel free to contact me at:
E-mail: **[email protected]**