enableAnalyticsCollection method
Future<void>
enableAnalyticsCollection(
{ - required bool enable,
})
override
Implementation
@override
Future<void> enableAnalyticsCollection({required bool enable}) async {
if (!isAnalyticsEnabled) {
logger.debug(this,
'$providerName: Analytics is disabled, collections will not be enabled');
return;
}
if (!isReady) {
throw Exception('Firebase Analytics is not ready');
}
await instance?.setAnalyticsCollectionEnabled(enable);
logger.debug(
this,
'$providerName: Analytics collection enabled: $enable',
);
}