setDistinctId static method

void setDistinctId(
  1. String identity, {
  2. String? appId,
})

Set the distinct ID to replace the default UUID distinct ID.

identity distinct id

appId It is used in multi-instance scenarios. If there is only one instance, it is recommended not to pass

Implementation

static void setDistinctId(String identity, {String? appId}) {
  ThinkingAnalyticsAPI? instance = _getInstanceByAppId(appId);
  instance?.identify(identity);
}