setCurrentScreen method
- @Deprecated('setCurrentScreen() has been deprecated. Please use logScreenView()')
- required String? screenName,
- String screenClassOverride = 'Flutter',
- 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:
- https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#setCurrentScreen(android.app.Activity, java.lang.String, java.lang.String)
- https://firebase.google.com/docs/reference/ios/firebaseanalytics/api/reference/Classes/FIRAnalytics#setscreennamescreenclass
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,
);
}