FlagshipConfig constructor

FlagshipConfig(
  1. Mode decisionMode,
  2. int timeout,
  3. int pollingTime,
  4. Level _logLevel,
  5. OnVisitorExposed? onVisitorExposed, {
  6. StatusListener? statusListener,
})

Implementation

FlagshipConfig(this.decisionMode, this.timeout, this.pollingTime,
    this._logLevel, this.onVisitorExposed,
    {this.statusListener}) {
  // Set the log Manager
  this.logManager = LogManager(level: _logLevel);
  // Log the timeout value in ms
  this.logManager.printLog(Level.ALL, "Flagship The $timeout is : ms", false);

  decisionManager = (decisionMode == Mode.DECISION_API)
      ? ApiManager(Service(http.Client()))
      : BucketingManager(Service(http.Client()), this.pollingTime);
}