inspector
a flutter package for inspecting widgets. also comes with an eyedropper functionality. useful for debugging widgets and for qa testing.
supports keyboard shortcuts if you’re using a physical keyboard.
inspired by inspx.
wip
warning, the development of this package is still in progress and some things may break your app.
features
- color picker
- size inspection
- padding inspection
- keyboard shortcuts
borderradius
inspectiontextstyle
inspection
installing
add the dependency:
$ flutter pub add inspector
import the package:
import 'package:inspector/inspector.dart';
wrap materialapp.builder
or widgetsapp.builder
with inspector
:
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, and
alt
or cmd
will toggle the widget inspector.
examples
contact me
feel free to contact me at:
e-mail: [email protected]
Comments are closed.