Clean up 'flutter run' output. (#6610)
Fixes #4166.
Fixes #5120.
Fixes #5399.
Fixes #6507.
diff --git a/packages/flutter_tools/lib/src/run.dart b/packages/flutter_tools/lib/src/run.dart
index 2fd0ea5..216253f 100644
--- a/packages/flutter_tools/lib/src/run.dart
+++ b/packages/flutter_tools/lib/src/run.dart
@@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:io';
+import 'package:meta/meta.dart';
import 'package:stack_trace/stack_trace.dart';
import 'application_package.dart';
@@ -197,13 +198,13 @@
}
}
- printStatus('Application running.');
+ printTrace('Application running.');
if (debuggingOptions.buildMode == BuildMode.release)
return 0;
if (vmService != null) {
await vmService.vm.refreshViews();
- printStatus('Connected to ${vmService.vm.mainView}\.');
+ printTrace('Connected to ${vmService.vm.mainView}\.');
}
if (vmService != null && traceStartup) {
@@ -261,11 +262,18 @@
}
@override
- void printHelp() {
- final bool showRestartText = !prebuiltMode && device.supportsRestart;
- String restartText = showRestartText ? ', "r" or F5 to restart the app,' : '';
- printStatus('Type "h" or F1 for help$restartText and "q", F10, or ctrl-c to quit.');
- printStatus('Type "w" to print the widget hierarchy of the app, and "t" for the render tree.');
+ void printHelp({ @required bool details }) {
+ if (!prebuiltMode && device.supportsRestart)
+ printStatus('To restart the app, press "r" or F5.');
+ if (_result.hasObservatory)
+ printStatus('The Observatory debugger and profiler is available at: http://127.0.0.1:${_result.observatoryPort}/');
+ if (details) {
+ printStatus('To dump the widget hierarchy of the app (debugDumpApp), press "w".');
+ printStatus('To dump the rendering tree of the app (debugDumpRenderTree), press "r".');
+ printStatus('To repeat this help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.');
+ } else {
+ printStatus('For a more detailed help message, press "h" or F1. To quit, press "q", F10, or Ctrl-C.');
+ }
}
}