setAnalytics method
Implementation
void setAnalytics(AnalyticsType analyticsType,
{String? cloudName, String? publicId}) {
switch (analyticsType) {
case AnalyticsType.auto:
eventsManager.trackingType = TrackingType.auto;
eventsManager.cloudName = cloudName ?? eventsManager.cloudName;
eventsManager.publicId = publicId ?? this.publicId;
break;
case AnalyticsType.manual:
eventsManager.trackingType = TrackingType.manual;
eventsManager.cloudName = cloudName ?? eventsManager.cloudName;
eventsManager.publicId = publicId ?? this.publicId;
break;
case AnalyticsType.disabled:
analytics = false;
removeListeners();
break;
}
}