flutter_debugframesize

Last updated:

0 purchases

flutter_debugframesize Image
flutter_debugframesize Images
Add to Cart

Description:

flutter debugframesize

flutter_debugframesize is an library to support widget extension to debug frame sizes in app runtime. It may be your pixel-perfect design UI debugging companion.
Pub link: https://pub.dev/packages/flutter_debugframesize
Features #
Show frame sizes for your specific widgets on screen.

Getting started #
Add to pubspec.yaml: flutter_debugframesize: ^1.0.0
Run this code before you render any widget to force disable it for production environment #
// default
FlutterDebugFrameSizeConstants.isNeverEnabled = kReleaseMode;

// disable for all envs
FlutterDebugFrameSizeConstants.isNeverEnabled = true;

// enable for all envs
FlutterDebugFrameSizeConstants.isNeverEnabled = false;
copied to clipboard
How to runtime toggle it #
FlutterDebugFrameSizeConstants.isEnabled.value = !FlutterDebugFrameSizeConstants.isEnabled.value;
copied to clipboard
Usage #
Refer to /example
Padding(
padding: const EdgeInsets.symmetric(horizontal: 40),
child: const SizedBox(width: double.infinity, height: 20).debugFrameSize(),
),
copied to clipboard
Image.network(
'https://docs.flutter.dev/assets/images/dash/dash-fainting.gif')
.debugFrameSize(
debugFrameSizeBodyStyle: const DebugFrameSizeBodyStyle(
color: Color(0xFF00cc00),
fontSize: 20,
thickness: 4,
dashPattern: [10, 10],
),
),
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.