Check whether the version in flutter-candidate.txt is a tag or a commit hash (#7993)

Follow-up to https://github.com/flutter/devtools/pull/7989

Fixes error running `devtools_tool update-flutter-sdk` when the Flutter version is a commit hash:

```
~/develop/devtools/packages/devtools_app/ [ext-settings-button*] devtools_tool update-flutter-sdk --use-cache
Using Flutter SDK from /Users/kenzieschmoll/develop/devtools/tool/flutter-sdk
Updating to Flutter version from cache: tags/1c77696615558bf8f9fa7a6e2a473f438f1c03ca 
Updating Flutter at /Users/kenzieschmoll/develop/devtools/tool/flutter-sdk
/Users/kenzieschmoll/develop/devtools/tool/flutter-sdk > git fetch
/Users/kenzieschmoll/develop/devtools/tool/flutter-sdk > git checkout tags/1c77696615558bf8f9fa7a6e2a473f438f1c03ca -f
error: pathspec 'tags/1c77696615558bf8f9fa7a6e2a473f438f1c03ca' did not match any file(s) known to git
ProcessException: Failed with exit code: 1. 
  Command: git checkout tags/1c77696615558bf8f9fa7a6e2a473f438f1c03ca -f
```
1 file changed
tree: 44c00ff2597195c0b54fe98bc60e83039b6da214
  1. .github/
  2. _markdown_images/
  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
  19. STYLE.md
  20. TESTING.md
  21. TRIAGE.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.