@@ -33,8 +33,8 @@ class OptimizelyUserContext {
33
33
Map <String , dynamic > attributes) async {
34
34
return Map <String , dynamic >.from (
35
35
await _channel.invokeMethod (Constants .setAttributesMethod, {
36
- Constants .requestSDKKey : _sdkKey,
37
- Constants .requestAttributes : Utils .covertToTypedMap (attributes)
36
+ Constants .sdkKey : _sdkKey,
37
+ Constants .attributes : Utils .covertToTypedMap (attributes)
38
38
}));
39
39
}
40
40
@@ -43,9 +43,9 @@ class OptimizelyUserContext {
43
43
[Map <String , dynamic > eventTags = const {}]) async {
44
44
return Map <String , dynamic >.from (
45
45
await _channel.invokeMethod (Constants .trackEventMethod, {
46
- Constants .requestSDKKey : _sdkKey,
47
- Constants .requestEventKey : eventKey,
48
- Constants .requestEventTags : Utils .covertToTypedMap (eventTags)
46
+ Constants .sdkKey : _sdkKey,
47
+ Constants .eventKey : eventKey,
48
+ Constants .eventTags : Utils .covertToTypedMap (eventTags)
49
49
}));
50
50
}
51
51
@@ -73,9 +73,9 @@ class OptimizelyUserContext {
73
73
[List <String > keys = const [], List <String > options = const []]) async {
74
74
return Map <String , dynamic >.from (
75
75
await _channel.invokeMethod (Constants .decideMethod, {
76
- Constants .requestSDKKey : _sdkKey,
77
- Constants .requestKeys : keys,
78
- Constants .requestOptimizelyDecideOption : options
76
+ Constants .sdkKey : _sdkKey,
77
+ Constants .keys : keys,
78
+ Constants .optimizelyDecideOption : options
79
79
}));
80
80
}
81
81
@@ -84,12 +84,12 @@ class OptimizelyUserContext {
84
84
OptimizelyDecisionContext context,
85
85
OptimizelyForcedDecision decision) async {
86
86
Map <String , dynamic > request = {
87
- Constants .requestSDKKey : _sdkKey,
88
- Constants .requestFlagKey : context.flagKey,
89
- Constants .requestVariationKey : decision.variationKey
87
+ Constants .sdkKey : _sdkKey,
88
+ Constants .flagKey : context.flagKey,
89
+ Constants .variationKey : decision.variationKey
90
90
};
91
91
if (context.ruleKey != null ) {
92
- request[Constants .requestRuleKey ] = context.ruleKey;
92
+ request[Constants .ruleKey ] = context.ruleKey;
93
93
}
94
94
return Map <String , dynamic >.from (
95
95
await _channel.invokeMethod (Constants .setForcedDecision, request));
@@ -99,19 +99,19 @@ class OptimizelyUserContext {
99
99
Future <Map <String , dynamic >> getForcedDecision () async {
100
100
return Map <String , dynamic >.from (
101
101
await _channel.invokeMethod (Constants .getForcedDecision, {
102
- Constants .requestSDKKey : _sdkKey,
102
+ Constants .sdkKey : _sdkKey,
103
103
}));
104
104
}
105
105
106
106
/// Removes the forced decision for a given decision context.
107
107
Future <Map <String , dynamic >> removeForcedDecision (
108
108
OptimizelyDecisionContext context) async {
109
109
Map <String , dynamic > request = {
110
- Constants .requestSDKKey : _sdkKey,
111
- Constants .requestFlagKey : context.flagKey,
110
+ Constants .sdkKey : _sdkKey,
111
+ Constants .flagKey : context.flagKey,
112
112
};
113
113
if (context.ruleKey != null ) {
114
- request[Constants .requestRuleKey ] = context.ruleKey;
114
+ request[Constants .ruleKey ] = context.ruleKey;
115
115
}
116
116
return Map <String , dynamic >.from (
117
117
await _channel.invokeMethod (Constants .removeForcedDecision, request));
@@ -121,7 +121,7 @@ class OptimizelyUserContext {
121
121
Future <Map <String , dynamic >> removeAllForcedDecisions () async {
122
122
return Map <String , dynamic >.from (
123
123
await _channel.invokeMethod (Constants .removeAllForcedDecisions, {
124
- Constants .requestSDKKey : _sdkKey,
124
+ Constants .sdkKey : _sdkKey,
125
125
}));
126
126
}
127
127
}
0 commit comments