logViewContent method

Future<void> logViewContent({
  1. Map<String, dynamic>? content,
  2. String? id,
  3. String? type,
  4. String? currency,
  5. double? price,
})

Implementation

Future<void> logViewContent({
  Map<String, dynamic>? content,
  String? id,
  String? type,
  String? currency,
  double? price,
}) {
  return logEvent(
    name: eventNameViewedContent,
    parameters: {
      paramNameContent: content != null ? json.encode(content) : null,
      paramNameContentId: id,
      paramNameContentType: type,
      paramNameCurrency: currency,
    },
    valueToSum: price,
  );
}