Fix project directory inference for inspector panel (#6857)

Fixes https://github.com/flutter/devtools/issues/6841, https://github.com/flutter/devtools/issues/6853

Instead of using the top level widget in the widget tree to determine the project directory, we instead use the main isolate's root library.

For google3, we also have extra logic to strip out everything before `/google3`, and to only use top-level directory after `google3` directory (or the top-level directory after `third_party`)
3 files changed
tree: 44656da0a051b6ca943e19ec2afa3f76aea12ec2
  1. .github/
  2. bin/
  3. case_study/
  4. docs/
  5. packages/
  6. third_party/
  7. tool/
  8. .gitattributes
  9. .gitignore
  10. AUTHORS
  11. BETA_TESTING.md
  12. CODE_OF_CONDUCT.md
  13. CODEOWNERS
  14. CONTRIBUTING.md
  15. DOCUMENTATION.md
  16. flutter-candidate.txt
  17. LICENSE
  18. README.md
README.md

Dart & Flutter DevTools

Build Status OpenSSF Scorecard

What is this?

Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.

Getting started

For documentation on installing and trying out DevTools, please see our docs.

Contributing and development

Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.

Terms and Privacy

By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.