logAnalyticsEvent method

void logAnalyticsEvent(
  1. String action, {
  2. Map<String, Object>? other,
})

allows us to log an analytics event with this set of features

Implementation

void logAnalyticsEvent(String action, {Map<String, Object>? other}) {
  final featureStateAtCurrentTime =
      _features.values.where((f) => f.exists).map((f) => f.copy()).toList();

  _analyticsCollectors
      .add(AnalyticsEvent(action, featureStateAtCurrentTime, other));
}