forked from firka/flutter
Add text to --analyze-size command output to launch DevTools with size data (#72295)
* Add text to --analyze-size command output to launch DevTools with size data.
This commit is contained in:
@@ -84,6 +84,14 @@ Future<void> buildLinux(
|
||||
globals.printStatus(
|
||||
'A summary of your Linux bundle analysis can be found at: ${outputFile.path}',
|
||||
);
|
||||
|
||||
// DevTools expects a file path relative to the .flutter-devtools/ dir.
|
||||
final String relativeAppSizePath = outputFile.path.split('.flutter-devtools/').last.trim();
|
||||
globals.printStatus(
|
||||
'\nTo analyze your app size in Dart DevTools, run the following command:\n'
|
||||
'flutter pub global activate devtools; flutter pub global run devtools '
|
||||
'--appSizeBase=$relativeAppSizePath'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user