CSQNavigatorObserver constructor

CSQNavigatorObserver({
  1. List<CustomVar>? customVarsProvider(
    1. Route route
    )?,
  2. String? screenNameProvider(
    1. Route
    )?,
  3. bool excludeRouteFromTracking(
    1. Route route
    )?,
})

Create a new instance of CSQNavigatorObserver

customVarsProvider is an optional callback that provides custom variables for each tracked route. Called whenever a screen is tracked.

screenNameProvider is an optional callback that provides a custom screen name for a route. If it returns null, the default screen name will be used.

excludeRouteFromTracking is an optional callback that determines whether a route should be excluded from tracking. Return true to skip tracking.

Implementation

factory CSQNavigatorObserver({
  List<CustomVar>? Function(Route<dynamic> route)? customVarsProvider,
  String? Function(Route<dynamic>)? screenNameProvider,
  bool Function(Route<dynamic> route)? excludeRouteFromTracking,
}) {
  return james987(
    excludeRouteFromTracking,
    customVarsProvider,
    screenNameProvider,
  );
}