setCurrentScreen method

  1. @override
Future<void> setCurrentScreen({
  1. required String? screenName,
  2. String screenClassOverride = 'Flutter',
  3. AnalyticsCallOptions? callOptions,
})
override

Sets the current screenName, which specifies the current visual context in your app.

This helps identify the areas in your app where users spend their time and how they interact with your app.

The class name can optionally be overridden by the screenClassOverride parameter.

The screenName and screenClassOverride remain in effect until the current Activity (in Android) or UIViewController (in iOS) changes or a new call to setCurrentScreen is made.

Setting a null screenName clears the current screen name.

See also:

Implementation

@override
Future<void> setCurrentScreen({
  required String? screenName,
  String screenClassOverride = 'Flutter',
  AnalyticsCallOptions? callOptions,
}) async {
  await _firebaseAnalytics.setCurrentScreen(
    screenName: screenName,
    screenClassOverride: screenClassOverride,
    callOptions: callOptions,
  );
}