getSnowplowClient static method

Future<SnowplowTracker?> getSnowplowClient([
  1. InitializeSdkProps? args
])

Implementation

static Future<SnowplowTracker?> getSnowplowClient(
    [InitializeSdkProps? args]) async {
  final snowplowTrackingEnabled = await cacheInstance.getValue(
    cdnConfigInstance.getKeys(StorageKeyKeys.isSnowplowTrackingEnabled)!,
  );

  if (snowplowTrackingEnabled == 'true' &&
      _snowplowClient == null &&
      args != null) {
    await initializeSnowplowClient(args);
  }

  return _snowplowClient;
}