trackScreenView method

Future<void> trackScreenView(
  1. String screenName, {
  2. Map<String, dynamic>? properties,
})

Log a manual screen view

Use this to track screens explicitly. For automatic tracking, add GrovsNavigatorObserver to your MaterialApp.navigatorObservers.

screenName - The screen name to record. properties - Optional JSON-serializable metadata.

Throws GrovsException if the operation fails.

Example:

await Grovs().trackScreenView('Checkout', properties: {'step': 2});

Implementation

Future<void> trackScreenView(
  String screenName, {
  Map<String, dynamic>? properties,
}) {
  return GrovsPlatform.instance.trackScreenView(
    screenName,
    properties: properties,
  );
}