Skip to content

Commit

Permalink
Only add default debug helpers in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Jul 18, 2022
1 parent 947a224 commit cc6698e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/src/debug_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ class DebugOverlay extends StatefulWidget {
}) : super(key: DebugOverlayState.key);

static final helpers = ValueNotifier<List<Widget>>([
MediaQueryDebugHelper(),
PackageInfoDebugHelper(),
DeviceInfoDebugHelper(),
if (_isInDebugMode) ...[
// These only work in debug mode; see the documentation of
// [DiagnosticsBasedDebugHelper] for the explanation.
MediaQueryDebugHelper(),
PackageInfoDebugHelper(),
DeviceInfoDebugHelper(),
],
]);

static void prependHelper(Widget debugHelper) {
Expand Down

0 comments on commit cc6698e

Please sign in to comment.