Statsig class

The main interface to interact with the Statsig SDK

Constructors

Statsig()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

checkGate(String gateName, [bool defaultValue = false]) bool
Returns the FeatureGate value for the current user.
flush() Future
Flushes any pending events.
getConfig(String configName) DynamicConfig
Returns the DynamicConfig with the given configName.
getExperiment(String experimentName) DynamicConfig
Returns the experiment with the given name as a DynamicConfig.
getLayer(String layerName) Layer
Returns the Layer with the given layerName.
initialize(String sdkKey, [StatsigUser? user, StatsigOptions? options]) Future<void>
Initializes the SDK so you can start interacting with Statsig.
logEvent(String eventName, {String? stringValue, double? doubleValue, Map<String, String>? metadata}) → void
Logs a custom event to Statsig.
reset() → void
shutdown() Future
Closes out the SDK flushing any pending events.
updateUser(StatsigUser user) Future
Informs the SDK that the user has changed and that values should be refetched from Statsig.