Elias Yishak ba1416954a
Update logic for getting Analytics instance from package:unified_analytics (#134756)
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
2023-09-29 16:20:16 +00:00
..

Flutter reports data to two separate systems:

  1. Anonymous usage statistics are reported to Google Analytics (for statistics such as the number of times the flutter tool was run within a given time period). The code that manages this is in [usage.dart].
  2. Crash reports for the flutter tool. These are not reports of when Flutter applications crash, but rather when the command-line flutter tool itself crashes. The code that manages this is in [crash_reporting.dart].

Opting out

Users can opt out of all reporting in a single place by running flutter config --no-analytics.