This repository was archived by the owner on Aug 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,23 @@ Currently [Optimizely](https://www.optimizely.com/) does not offer a dedicated f
88
99## Usage
1010
11+ ** You need to init and set up user before using an functions**
12+
1113functions supported:
1214[ ` isFeatureEnabled ` ] ( https://docs.developers.optimizely.com/full-stack/docs/is-feature-enabled-android )
1315[ ` getAllFeatureVariables ` ] ( https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android ) .
16+ [ ` getAllEnabledFeatures ` ] ( https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android ) .
17+ [ ` activategetVariable ` ] ( https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android ) .
1418[ ` getVariable ` ] ( https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android ) .
1519[ ` trackEvent ` ] ( https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android ) .
1620
1721``` dart
1822import 'package:optimizely_dart/optimizely_dart.dart';
19- ...
2023await OptimizelyPlugin.initOptimizelyManager('your_optimizely_sdk_key');
21- bool featureEnabled = await OptimizelyPlugin.isFeatureEnabled('your_flag', 'some_user@xyz.com');
2224...
23- Map<String, dynamic> variables = await OptimizelyPlugin.getAllFeatureVariables(
24- 'your_flag_with_vars',
25- 'some_user@xyz.com',
26- {'attribute_key': attribute_value},
27- );
28- String variable_value = variables['variable_name'];
25+ unawaited(OptimizelyPlugin().setUser(_personManager.person?.id, {'isLoggedIn':true}));
26+ ...
27+ bool featureEnabled = await OptimizelyPlugin.isFeatureEnabled('your_flag', 'some_user@xyz.com');
2928
3029 var variation = await OptimizelyPlugin().getVariation('your_flag', 'some_user@xyz.com',{});
3130
Original file line number Diff line number Diff line change @@ -53,8 +53,6 @@ class OptimizelyPlugin {
5353 return Map <String , dynamic >.from (featureVariables);
5454 }
5555
56- //https://docs.developers.optimizely.com/full-stack/docs/run-a-b-tests
57- //TODO: deprecate: use activateGetVariation
5856 Future <String ?> getVariation (
5957 String featureKey,
6058 userID,
You can’t perform that action at this time.
0 commit comments