determineAnalyticsSettings method
Determines the analytics settings based on configuration / settings. Called from run before any analytics events are sent and before any command is run.
globalConfiguration is set before this method is called.
By default it checks whether the onAnalyticsEvent callback is set
and the --analytics option.
Subclasses can override this method to customize the behavior,
e.g. to ask the user for permission.
Implementation
@override
Future<bool> determineAnalyticsSettings() async {
final analyticsEnabled = await _resolveAnalyticsConsent();
_analyticsConsent = analyticsEnabled;
return analyticsEnabled;
}