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