flush static method

void flush({
  1. String? appId,
})

Empty the cache queue. When this function is called, the data in the current cache queue will attempt to be reported. If the report succeeds, local cache data will be deleted.

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

Implementation

static void flush({String? appId}) {
  ThinkingAnalyticsAPI? instance = _getInstanceByAppId(appId);
  instance?.flush();
}