Allow flutter SDK binary to be a symlink (#9924) * Fix SDK path resolution when Flutter on PATH is a symlink When running `dt update-flutter-sdk --update-on-path`, `FlutterSdk.findFromPathEnvironmentVariable` failed if `flutter` on PATH was a symlink (e.g. `/usr/local/bin/flutter`). It stripped `bin/flutter` from the unresolved symlink path, resulting in `/usr/local` being treated as the SDK root directory. This change: - Updates `FlutterSdk.findFromPath` to resolve symbolic links before determining the SDK root directory. - Updates `UpdateFlutterSdkCommand` to use the remote returned by `findRemote` instead of hardcoding 'upstream'. - Adds unit tests in `tool/test/model_test.dart` for `FlutterSdk.findFromPath`. * Revert change to "findRemote" behavior * Revert change to "findRemote" behavior * Simplify symlink resolution using try-catch fallback in FlutterSdk.findFromPath * Add release note for dt sync symlink fix * format * Revert changes to release notes * extract repeated calls to path.dirname * Avoid explicit variable type declaration. * Remove ignore for DCM
Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.
For documentation on installing and trying out DevTools, please see our docs.
Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.
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.