Unverified Commit d996ab92 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Rename "slow mode" to be "debug mode" (#15205)

This moves toward more consistency in our messaging. Apps are
launched using --debug, so the banner will reflect the build
mode.
parent 1087279a
...@@ -36,6 +36,6 @@ class SampleScreenshotsState extends State<SampleScreenshots> { ...@@ -36,6 +36,6 @@ class SampleScreenshotsState extends State<SampleScreenshots> {
void main() { void main() {
enableFlutterDriverExtension(); enableFlutterDriverExtension();
WidgetsApp.debugAllowBannerOverride = false; // No "slow mode" banner. WidgetsApp.debugAllowBannerOverride = false; // No "debug" banner.
runApp(new SampleScreenshots()); runApp(new SampleScreenshots());
} }
...@@ -202,7 +202,7 @@ class GalleryHomeState extends State<GalleryHome> with SingleTickerProviderState ...@@ -202,7 +202,7 @@ class GalleryHomeState extends State<GalleryHome> with SingleTickerProviderState
) )
); );
// In checked mode our MaterialApp will show the default "slow mode" banner. // In checked mode our MaterialApp will show the default "debug" banner.
// Otherwise show the "preview" banner. // Otherwise show the "preview" banner.
bool showPreviewBanner = true; bool showPreviewBanner = true;
assert(() { assert(() {
......
...@@ -511,7 +511,7 @@ class MaterialApp extends StatefulWidget { ...@@ -511,7 +511,7 @@ class MaterialApp extends StatefulWidget {
/// reported by the framework. /// reported by the framework.
final bool showSemanticsDebugger; final bool showSemanticsDebugger;
/// Turns on a little "SLOW MODE" banner in checked mode to indicate /// Turns on a little "DEBUG" banner in checked mode to indicate
/// that the app is in checked mode. This is on by default (in /// that the app is in checked mode. This is on by default (in
/// checked mode), to turn it off, set the constructor argument to /// checked mode), to turn it off, set the constructor argument to
/// false. In release mode this has no effect. /// false. In release mode this has no effect.
......
...@@ -348,7 +348,7 @@ class WidgetsApp extends StatefulWidget { ...@@ -348,7 +348,7 @@ class WidgetsApp extends StatefulWidget {
/// material package. /// material package.
final InspectorSelectButtonBuilder inspectorSelectButtonBuilder; final InspectorSelectButtonBuilder inspectorSelectButtonBuilder;
/// Turns on a "SLOW MODE" little banner in checked mode to indicate /// Turns on a "DEBUG" little banner in checked mode to indicate
/// that the app is in checked mode. This is on by default (in /// that the app is in checked mode. This is on by default (in
/// checked mode), to turn it off, set the constructor argument to /// checked mode), to turn it off, set the constructor argument to
/// false. In release mode this has no effect. /// false. In release mode this has no effect.
......
...@@ -233,7 +233,7 @@ class BannerPainter extends CustomPainter { ...@@ -233,7 +233,7 @@ class BannerPainter extends CustomPainter {
/// See also: /// See also:
/// ///
/// * [CheckedModeBanner], which the [WidgetsApp] widget includes by default in /// * [CheckedModeBanner], which the [WidgetsApp] widget includes by default in
/// debug mode, to show a banner that says "SLOW MODE". /// debug mode, to show a banner that says "DEBUG".
class Banner extends StatelessWidget { class Banner extends StatelessWidget {
/// Creates a banner. /// Creates a banner.
/// ///
...@@ -323,7 +323,7 @@ class Banner extends StatelessWidget { ...@@ -323,7 +323,7 @@ class Banner extends StatelessWidget {
} }
} }
/// Displays a [Banner] saying "SLOW MODE" when running in checked mode. /// Displays a [Banner] saying "DEBUG" when running in checked mode.
/// [MaterialApp] builds one of these by default. /// [MaterialApp] builds one of these by default.
/// Does nothing in release mode. /// Does nothing in release mode.
class CheckedModeBanner extends StatelessWidget { class CheckedModeBanner extends StatelessWidget {
...@@ -344,7 +344,7 @@ class CheckedModeBanner extends StatelessWidget { ...@@ -344,7 +344,7 @@ class CheckedModeBanner extends StatelessWidget {
assert(() { assert(() {
result = new Banner( result = new Banner(
child: result, child: result,
message: 'SLOW MODE', message: 'DEBUG',
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
location: BannerLocation.topEnd, location: BannerLocation.topEnd,
); );
...@@ -358,7 +358,7 @@ class CheckedModeBanner extends StatelessWidget { ...@@ -358,7 +358,7 @@ class CheckedModeBanner extends StatelessWidget {
super.debugFillProperties(description); super.debugFillProperties(description);
String message = 'disabled'; String message = 'disabled';
assert(() { assert(() {
message = '"SLOW MODE"'; message = '"DEBUG"';
return true; return true;
}()); }());
description.add(new DiagnosticsNode.message(message)); description.add(new DiagnosticsNode.message(message));
......
...@@ -424,7 +424,7 @@ class WidgetInspectorService { ...@@ -424,7 +424,7 @@ class WidgetInspectorService {
/// Returns whether [Widget] creation locations are available. /// Returns whether [Widget] creation locations are available.
/// ///
/// [Widget] creation locations are only available for slow mode builds when /// [Widget] creation locations are only available for debug mode builds when
/// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 /// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0
/// is required as injecting creation locations requires a /// is required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation). /// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
...@@ -1127,7 +1127,7 @@ class _Location { ...@@ -1127,7 +1127,7 @@ class _Location {
/// Returns the creation location of an object if one is available. /// Returns the creation location of an object if one is available.
/// ///
/// Creation locations are only available for slow mode builds when /// Creation locations are only available for debug mode builds when
/// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is /// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is
/// required as injecting creation locations requires a /// required as injecting creation locations requires a
/// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation). /// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation).
......
...@@ -273,7 +273,7 @@ void main() { ...@@ -273,7 +273,7 @@ void main() {
..rotate(angle: math.PI / 4.0) ..rotate(angle: math.PI / 4.0)
..rect(rect: new Rect.fromLTRB(-40.0, 28.0, 40.0, 40.0), color: const Color(0x7f000000), hasMaskFilter: true) ..rect(rect: new Rect.fromLTRB(-40.0, 28.0, 40.0, 40.0), color: const Color(0x7f000000), hasMaskFilter: true)
..rect(rect: new Rect.fromLTRB(-40.0, 28.0, 40.0, 40.0), color: const Color(0xa0b71c1c), hasMaskFilter: false) ..rect(rect: new Rect.fromLTRB(-40.0, 28.0, 40.0, 40.0), color: const Color(0xa0b71c1c), hasMaskFilter: false)
..paragraph(offset: const Offset(-40.0, 24.0)) ..paragraph(offset: const Offset(-40.0, 29.0))
..restore ..restore
); );
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment