handleTrackScreenLeave method

void handleTrackScreenLeave(
  1. MethodCall call
)

Implementation

void handleTrackScreenLeave(MethodCall call) {
  Map<Object?, Object?> args = call.arguments as Map<Object?, Object?>;
  String screenName = args['screenName'] as String;
  dynamic properties = args['properties'];
  Map<String, dynamic> props = {
    ...(properties ?? {}),
    ..._mixpanelProperties,
    'current_page_title': screenName,
    '\$mp_autocapture': true,
  };
  track('\$mp_page_leave', safeJsify(props));
}