trackPage static method

void trackPage(
  1. String pageName,
  2. BuildContext context
)

Implementation

static void trackPage(String pageName, BuildContext context) {
  try {
    if (Plotline.shouldCheckForParentWidget) {
      _ctx = getTopmostContext(context);
    } else {
      _ctx = context;
    }
    plotlineDebugLog("trackPage called with pageName: $pageName and context: $context");
    plotlineChannel
        .invokeMethod('trackPage', <String, dynamic>{'pageName': pageName});
  } catch (e) {
    debugPrint("Error in trackPage: $e");
  }
}