Skip to content

Commit

Permalink
Make MediaQueryDebugHelper, PackageInfoDebugHelper, DeviceInfoDebugHe…
Browse files Browse the repository at this point in the history
…lper const
  • Loading branch information
JonasWanke committed Nov 7, 2023
1 parent 822ccbc commit 4a251d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/debug_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class DebugOverlay extends StatefulWidget {
if (_isInDebugMode) ...[
// These only work in debug mode; see the documentation of
// [DiagnosticsBasedDebugHelper] for the explanation.
MediaQueryDebugHelper(),
PackageInfoDebugHelper(),
DeviceInfoDebugHelper(),
const MediaQueryDebugHelper(),
const PackageInfoDebugHelper(),
const DeviceInfoDebugHelper(),
],
]);

Expand Down
2 changes: 2 additions & 0 deletions lib/src/helpers/device_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import '../debug_helper.dart';
import 'device_info_io.dart' if (dart.library.js) 'device_info_html.dart';

class DeviceInfoDebugHelper extends StatelessWidget {
const DeviceInfoDebugHelper();

@override
Widget build(BuildContext context) {
return DiagnosticsBasedDebugHelper(
Expand Down
2 changes: 2 additions & 0 deletions lib/src/helpers/media_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:flutter/widgets.dart';
import '../debug_helper.dart';

class MediaQueryDebugHelper extends StatelessWidget {
const MediaQueryDebugHelper();

@override
Widget build(BuildContext context) {
return DiagnosticsBasedDebugHelper(
Expand Down
2 changes: 2 additions & 0 deletions lib/src/helpers/package_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'package:package_info_plus/package_info_plus.dart';
import '../debug_helper.dart';

class PackageInfoDebugHelper extends StatelessWidget {
const PackageInfoDebugHelper();

@override
Widget build(BuildContext context) {
return DiagnosticsBasedDebugHelper(
Expand Down

0 comments on commit 4a251d2

Please sign in to comment.