setCurrentScreen method

  1. @Deprecated('setCurrentScreen() has been deprecated. Please use logScreenView()')
Future<void> setCurrentScreen({
  1. required String? screenName,
  2. String screenClassOverride = 'Flutter',
  3. AnalyticsCallOptions? callOptions,
})

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

@Deprecated(
  'setCurrentScreen() has been deprecated. Please use logScreenView()',
)
Future<void> setCurrentScreen({
  required String? screenName,
  String screenClassOverride = 'Flutter',
  AnalyticsCallOptions? callOptions,
}) async {
  await _delegate.setCurrentScreen(
    screenName: screenName,
    screenClassOverride: screenClassOverride,
    callOptions: callOptions,
  );
}