Visitor class

Mixed-in types

Constructors

Visitor(FlagshipConfig config, String visitorId, bool _isAuthenticated, Map<String, Object> context, bool _hasConsented, OnFlagStatusChanged? _onFlagStatusChanged, OnFlagStatusFetchRequired? _onFlagStatusFetchRequired, OnFlagStatusFetched? _onFlagStatusFetched)

Properties

anonymousId ↔ String?
getter/setter pair
assignmentsHistory ↔ Map<String, dynamic>
AssignmentsHistory history
getter/setter pair
config → FlagshipConfig
Configuration
final
dataUsageTracking ↔ DataUsageTracking
DataUsageTracking
getter/setter pair
decisionManager → DecisionManager
Core decision manager , can manage both modes for the sdk
no setter
eaiVisitorScored ↔ bool
getter/setter pair
emotion_ai ↔ EmotionAI?
getter/setter pair
emotionScoreAI ↔ String?
getter/setter pair
fetchReasons → FetchFlagsRequiredStatusReason
no setter
flagshipDelegate → FlagshipDelegate
Delegate to update the status
final
flagStatus ↔ FlagStatus
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
modifications ↔ Map<String, Modification>
Map for the modification , {"key for the flag": Modification object}
getter/setter pair
onFlagUpdate ↔ void Function(List<String> changedFlagKeys)?
Optional callback that is triggered when flags are updated by QA Assistant This allows clients to refresh their UI in response to QA changes Usage: visitor.onFlagUpdate = (changedKeys) => setState(() { /* refresh */ });
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionDuration ↔ DateTime
getter/setter pair
trackingManager ↔ TrackingManager?
getter/setter pair
visitorId ↔ String
VisitorId
getter/setter pair

Methods

authenticate(String visitorId) → dynamic
Use authenticate methode to go from Logged-out session to logged-in session
clearContext() → void
collectEmotionsAIEvents(String screenName) → dynamic
emotionAiCaptureCompleted(dynamic score) → void
Called when a score is successfully fetched from the server.
override
fetchFlags() → Future<void>
getConsent() → bool
getContext() → Map<String, Object>
Get context
getCurrentContext() → Map<String, Object>
Get the current context for the visitor
getFlag<T>(String key) → Flag
getFlags() → FlagCollection
  • Returns: an instance of FSFlagCollection with flags
  • getFlagSyncStatus() → FlagSyncStatus
    isAuthenticated() → bool
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    onAppScreenChange(String screenName) → dynamic
    sendHit(BaseHit hit) → Future<void>
    Send hit
    setConsent(bool newValue) → void
    Set Consent
    toString() → String
    A string representation of this object.
    inherited
    unauthenticate() → dynamic
    Use authenticate methode to go from Logged in session to logged out session
    updateContext<T>(String key, T value) → void
    Update context with key and value
    updateContextWithMap(Map<String, Object> context) → void
    updateFlagshipContext<T>(FlagshipContext flagshipContext, T value) → void
    Update with predefined context

    Operators

    operator ==(Object other) → bool
    The equality operator.
    inherited