logIfNotLoggedYet method

Future<void> logIfNotLoggedYet(
  1. Outcome outcome
)

Use this function to log an outcome only if this particular context object hasn't been logged yet

Implementation

Future<void> logIfNotLoggedYet(Outcome outcome) {
  if (!_contextId.isValid()) {
    print(
        "[ContextSDK] Invalid context received, please contact support@contextsdk.com");
    return Future.value();
  }

  return ContextSdkPlatform.instance
      .contextLog(_contextId.contextId, outcome.value, false);
}