Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencies {
implementation 'org.slf4j:slf4j-api:2.0.7'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
implementation "com.optimizely.ab:android-sdk:5.0.0"
implementation "com.optimizely.ab:android-sdk:5.0.1"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
implementation ('com.google.guava:guava:19.0') {
exclude group:'com.google.guava', module:'listenablefuture'
Expand Down
2 changes: 1 addition & 1 deletion ios/optimizely_flutter_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'OptimizelySwiftSDK', '5.0.0'
s.dependency 'OptimizelySwiftSDK', '5.1.1'
s.platform = :ios, '10.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
Expand Down
4 changes: 0 additions & 4 deletions lib/src/optimizely_client_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ class OptimizelyClientWrapper {

if (checkCallBackExist(sdkKey, callback)) {
// ignore: avoid_print
print("callback already exists.");
return -1;
}

Expand Down Expand Up @@ -417,7 +416,6 @@ class OptimizelyClientWrapper {

if (checkCallBackExist(sdkKey, callback)) {
// ignore: avoid_print
print("callback already exists.");
return -1;
}

Expand All @@ -440,7 +438,6 @@ class OptimizelyClientWrapper {

if (checkCallBackExist(sdkKey, callback)) {
// ignore: avoid_print
print("callback already exists.");
return -1;
}

Expand All @@ -464,7 +461,6 @@ class OptimizelyClientWrapper {

if (checkCallBackExist(sdkKey, callback)) {
// ignore: avoid_print
print("callback already exists.");
return -1;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/src/utils/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class Constants {
static const String userContextId = "userContextId";
static const String userContext = "userContext";
static const String experiment = "experiment";
static const String experimentId = "experimentId";
static const String variation = "variation";
static const String variationId = "variationId";
static const String userId = "userId";
static const String vuid = "vuid";
static const String experimentKey = "experimentKey";
Expand Down
31 changes: 28 additions & 3 deletions test/test_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ class TestUtils {
handler(MethodCall(Constants.decisionCallBackListener, {
Constants.id: id,
Constants.sdkKey: sdkKey,
Constants.payload: {Constants.type: "$id", Constants.userId: "test"}
Constants.payload: <String, Object>{
Constants.type: "$id",
Constants.userId: "test",
Constants.decisionInfo: const {
Constants.experimentId: "experiment_12345",
Constants.variationId: "variation_12345",
},
}
}));
}

Expand Down Expand Up @@ -129,7 +136,15 @@ class TestUtils {
Constants.eventKey: "$id",
Constants.userId: "test",
Constants.attributes: {"test": id},
Constants.eventTags: {"testTag": id}
Constants.eventTags: {
"testTag": id,
"nestedTag": {
"string_key": "stringValue",
"int_key": 123,
"double_key": 123.456,
"bool_key": true
}
}
};
handler(MethodCall(Constants.trackCallBackListener, {
Constants.id: id,
Expand All @@ -145,6 +160,12 @@ class TestUtils {
Constants.attributes: {"test": id},
Constants.eventTags: {
"testTag": id,
"nestedTag": {
"string_key": "stringValue",
"int_key": 123,
"double_key": 123.456,
"bool_key": true
},
"client_name": clientName,
"client_version": sdkVersion
}
Expand Down Expand Up @@ -179,7 +200,11 @@ class TestUtils {
static bool testDecisionNotificationPayload(
List notifications, int id, int actualID) {
if (notifications[id].type != "$actualID" ||
notifications[id].userId != "test") {
notifications[id].userId != "test" ||
notifications[id].decisionInfo[Constants.experimentId] !=
"experiment_12345" ||
notifications[id].decisionInfo[Constants.variationId] !=
"variation_12345") {
return false;
}
return true;
Expand Down