Apptimize class
The Apptimize interface is the main interaction point with the Apptimize SDK for developers.
To get started call startApptimize with your Apptimize app key.
Constructors
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 Properties
-
apptimizeAnonUserId
→ Future<
String?> -
Gets the current Apptimize-created anonymous user id.
no setter
-
apptimizeEnrolledInExperimentStream
→ Stream<
ApptimizeEnrolledInExperimentEvent> -
Gets the broadcast stream of
ApptimizeEnrolledInExperimentEvent
events.no setter -
apptimizeInitializedStream
→ Stream<
ApptimizeInitializedEvent> -
Gets the broadcast stream of
ApptimizeInitializedEvent
events.no setter -
apptimizeMetadataStateChangedStream
→ Stream<
ApptimizeMetadataStateChangedEvent> -
Gets the broadcast stream of
ApptimizeMetadataStateChangedEvent
events.no setter -
apptimizeParticipatedInExperimentStream
→ Stream<
ApptimizeParticipatedInExperimentEvent> -
Gets the broadcast stream of
ApptimizeParticipatedInExperimentEvent
events.no setter -
apptimizeResumedStream
→ Stream<
ApptimizeResumedEvent> -
Gets the broadcast stream of
ApptimizeResumedEvent
events.no setter -
apptimizeTestInfo
→ Future<
Map< String, ApptimizeTestInfo?> ?> -
Get information about all Apptimize A/B tests and Feature Flags that the
device is enrolled in.
no setter
-
apptimizeTestsProcessedStream
→ Stream<
ApptimizeTestsProcessedEvent> -
Gets the broadcast stream of
ApptimizeTestsProcessedEvent
events.no setter -
apptimizeUnenrolledInExperimentStream
→ Stream<
ApptimizeUnenrolledInExperimentEvent> -
Gets the broadcast stream of
ApptimizeUnenrolledInExperimentEvent
events.no setter -
customerUserId
→ Future<
String?> -
Gets the current customer-specified user id.
no setter
-
instantUpdateAndWinnerInfo
→ Future<
Map< String, ApptimizeInstantUpdateOrWinnerInfo?> ?> -
Get information about all winning A/B tests and instant updates that the
device will show.
no setter
-
libraryVersion
→ Future<
String> -
Get the underlying library version.
no setter
-
metadataState
→ Future<
ApptimizeMetaDataState> -
Gets the current state of the Apptimize metadata.
no setter
-
offline
→ Future<
bool> -
Gets the current value of the offline mode setting.
no setter
-
pilotTargetingId
→ Future<
String?> -
Gets the currently set pilot targeting id.
no setter
Static Methods
-
clearAllForcedVariants(
) → Future< void> - Cancel all forced variants.
-
clearForcedVariant(
int variantId) → Future< void> - Cancel a forced variant with the given id.
-
disable(
) → Future< void> - Disables Apptimize and all of its features for one application session.
-
forceVariant(
int variantId) → Future< void> - Force a variant with the given id to be enabled.
-
getUserAttributeBool(
String attributeName) → Future< bool?> -
Get the currently set
bool
value for an attribute. -
getUserAttributeDouble(
String attributeName) → Future< double?> -
Get the currently set
double
value for an attribute. -
getUserAttributeInteger(
String attributeName) → Future< int?> -
Get the currently set
int
value for an attribute. -
getUserAttributeString(
String attributeName) → Future< String?> -
Get the currently set
String
value for an attribute. -
getVariants(
) → Future< Map< int, ApptimizeVariant> > - Get information about all available variants.
-
isFeatureFlagOn(
String featureFlagName) → Future< bool> - Check whether a given feature flag is enabled or not.
-
removeAllUserAttributes(
) → Future< void> - Remove all user defined attributes.
-
removeUserAttribute(
String attributeName) → Future< void> -
Remove the user defined attribute for a given for
attributeName
. -
runTest(
String testName, Function baseline, Map< String, Function> codeblocks, [int? updateMetadataTimeout]) → Future<void> -
Runs the code block A/B test specified by
testName
. -
setCustomerUserId(
String? customerUserId) → Future< void> - Sets the current customer-specified user id.
-
setOffline(
bool isOffline) → Future< void> - Updates the Apptimize offline mode flag.
-
setPilotTargetingId(
String? pilotTargetingId) → Future< void> - Sets the pilotTargetingId
-
setUserAttributeBool(
String attributeName, bool attributeValue) → Future< void> - Set a user attribute bool to be used for targeting, filtering and segmentation.
-
setUserAttributeDouble(
String attributeName, double attributeValue) → Future< void> - Set a user attribute double to be used for targeting, filtering and segmentation.
-
setUserAttributeInteger(
String attributeName, int attributeValue) → Future< void> - Set a user attribute int to be used for targeting, filtering and segmentation.
-
setUserAttributeString(
String attributeName, String attributeValue) → Future< void> - Set a user attribute String to be used for targeting, filtering and segmentation.
-
startApptimize(
String appKey, [ApptimizeOptions? options]) → void -
Starts apptimize with the specified
appKey
. -
track(
String eventName, [double? value]) → Future< void> -
Generate an event with the name
eventName
. -
waitForTestsToBecomeAvailable(
int timeout) → Future< void> - Wait for the initial set of tests to become available.