build method

Visitor build()

Implementation

Visitor build() {
  Visitor newVisitor = Visitor(
      Flagship.sharedInstance().getConfiguration() ?? ConfigBuilder().build(),
      visitorId,
      _isAuthenticated,
      _context,
      hasConsented: _hasConsented);
  if (this.instanceType == Instance.SINGLE_INSTANCE) {
    //Set this visitor as shared instance
    Flagship.setCurrentVisitor(newVisitor);
  }
  return newVisitor;
}