appendOutcomeMetadata method

Future<void> appendOutcomeMetadata(
  1. Map<String, dynamic> metadata
)

This method allows you to append custom outcomes to that specific outcome We recommend using this method to provide information like the selected price tier / plan, or other relevant info about the type of product or action the user has selected Using the same ID multiple times will replace the previous entries with that ID.

Implementation

Future<void> appendOutcomeMetadata(Map<String, dynamic> metadata) {
  if (!_contextId.isValid()) {
    print(
        "[ContextSDK] Invalid context received, please contact support@contextsdk.com");
    return Future.value();
  }

  return ContextSdkPlatform.instance
      .contextAppendOutcomeMetadata(_contextId.contextId, metadata);
}