trackPageWithCustomData static method

Future<void> trackPageWithCustomData(
  1. PageViewEvent? pageViewEvent, [
  2. String? customName
])

Implementation

static Future<void> trackPageWithCustomData(PageViewEvent? pageViewEvent,
    [String? customName]) async {
  if (customName != null) {
    await _channel.invokeMethod(
        'trackPageWithCustomNameAndPageViewEvent', [customName]);
  } else if (pageViewEvent != null) {
    //debugPrint(jsonEncode(pageViewEvent.toJson()), wrapWidth: 1024);
    await _channel.invokeMethod(
        'trackPageWithCustomData', [jsonEncode(pageViewEvent.toJson())]);
  }
}