logScreenView method

Future<void> logScreenView({
  1. String? screenClass,
  2. String? screenName,
  3. Map<String, Object>? parameters,
  4. AnalyticsCallOptions? callOptions,
})

Logs the standard screen_view event.

This event signifies a screen view. Use this when a screen transition occurs.

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

Implementation

Future<void> logScreenView({
  String? screenClass,
  String? screenName,
  Map<String, Object>? parameters,
  AnalyticsCallOptions? callOptions,
}) {
  _assertParameterTypesAreCorrect(parameters);

  return _delegate.logEvent(
    name: 'screen_view',
    parameters: filterOutNulls(<String, Object?>{
      _SCREEN_CLASS: screenClass,
      _SCREEN_NAME: screenName,
      if (parameters != null) ...parameters,
    }),
    callOptions: callOptions,
  );
}