analysisPathFromBuildOutput function
Extracts the code-size analysis path from flutter build --analyze-size
output — the tool prints a sentinel line pointing at the JSON it wrote.
A summary of your APK analysis can be found at: <path>.json
Implementation
String? analysisPathFromBuildOutput(String output) {
final m = RegExp(
r'A summary of your [A-Za-z]+ analysis can be found at: (.+?\.json)')
.firstMatch(output);
return m?.group(1);
}