Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251
This updates the `Analytics` constructor to provide it with the enabled features for the flutter-tool. This will be sent with each event for the flutter-tool.
Fixes issues:
- https://github.com/flutter/flutter/issues/138035
Similar to GA3, we will now record the host running the flutter tool, such as VSCode, stored in the `FLUTTER_HOST` env variable
Related to tracking issue:
- https://github.com/flutter/flutter/issues/128251
This PR sends analytic events for each of the doctor validators.
This PR below will need to land first in `dart-lang/tools` before this merges.
Part of:
- https://github.com/flutter/flutter/issues/128251
Currently, when we want to use the analytics instance from `package:unified_analytics`, we are just grabbing it from globals. However, with the legacy analytics instance, there are some things we check to return a no-op version of the instance.. for example, if we are running on bots or a non standard branch, we use a no-op instance
This PR uses the same previous checks for the new analytics instance