Skip to content

Commit 3968799

Browse files
committed
refactor: extract debug mode message as named constant
1 parent 9f64e84 commit 3968799

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

packages/devtools_app/lib/src/screens/performance/panes/rebuild_stats/rebuild_stats.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ import '../../../../shared/ui/common_widgets.dart';
2020
import '../flutter_frames/flutter_frame_model.dart';
2121
import 'rebuild_stats_model.dart';
2222

23+
@visibleForTesting
24+
const debugModeOnlyMessage =
25+
'Rebuild information is not available for this frame.\n'
26+
'Widget rebuild counts are only available when running '
27+
'an app in debug mode.';
28+
2329
class RebuildStatsView extends StatefulWidget {
2430
const RebuildStatsView({
2531
super.key,
@@ -97,12 +103,7 @@ class _RebuildStatsViewState extends State<RebuildStatsView>
97103
false;
98104
if (isProfileBuild) {
99105
return const Center(
100-
child: Text(
101-
'Rebuild information is not available for this frame.\n'
102-
'Widget rebuild counts are only available when running '
103-
'an app in debug-mode.',
104-
textAlign: TextAlign.center,
105-
),
106+
child: Text(debugModeOnlyMessage, textAlign: TextAlign.center),
106107
);
107108
}
108109
return Column(

0 commit comments

Comments
 (0)