logViewPromotion method

Future<void> logViewPromotion({
  1. String? creativeName,
  2. String? creativeSlot,
  3. List<AnalyticsEventItem>? items,
  4. String? locationId,
  5. String? promotionId,
  6. String? promotionName,
  7. Map<String, Object>? parameters,
})
inherited

Logs the standard view_promotion event.

This event signifies that a promotion was shown to a user.

See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#VIEW_PROMOTION

Implementation

Future<void> logViewPromotion({
  String? creativeName,
  String? creativeSlot,
  List<AnalyticsEventItem>? items,
  String? locationId,
  String? promotionId,
  String? promotionName,
  Map<String, Object>? parameters,
}) {
  _assertParameterTypesAreCorrect(parameters);
  _assertItemsParameterTypesAreCorrect(items);

  return _delegate.logEvent(
    name: 'view_promotion',
    parameters: filterOutNulls(<String, Object?>{
      _CREATIVE_NAME: creativeName,
      _CREATIVE_SLOT: creativeSlot,
      _ITEMS: _marshalItems(items),
      _LOCATION_ID: locationId,
      _PROMOTION_ID: promotionId,
      _PROMOTION_NAME: promotionName,
      if (parameters != null) ...parameters,
    }),
  );
}