Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c1ad120
Add FallbackTreatmentsConfiguration support to SplitConfiguration
EmilianoSanchez Jan 13, 2026
2f6fb96
Merge branch 'main' into FME-12349-fallback-treatments-configuration
EmilianoSanchez Jan 16, 2026
52a8cf8
Rename config
EmilianoSanchez Jan 16, 2026
0e4853b
Rename FallbackTreatments to FallbackTreatmentsConfiguration
EmilianoSanchez Jan 19, 2026
0deae7f
Polishing
EmilianoSanchez Jan 20, 2026
5fc79aa
Replace SplitResult with FallbackTreatment in fallback treatments con…
EmilianoSanchez Jan 20, 2026
d0a5d04
Add fallbackTreatments configuration support for web platform
EmilianoSanchez Jan 21, 2026
4ebc22c
Merge pull request #176 from splitio/FME-12349-fallback-treatments-co…
EmilianoSanchez Jan 26, 2026
1db9d7b
Merge branch 'development' into FME-12349-fallback-treatments_baseline
EmilianoSanchez Jan 26, 2026
9ec5682
Merge branch 'FME-12349-fallback-treatments_baseline' into FME-12349-…
EmilianoSanchez Jan 26, 2026
3b0327b
Add fallback treatments configuration support for Android and iOS pla…
EmilianoSanchez Jan 27, 2026
e0df25f
Update example podfile
EmilianoSanchez Jan 27, 2026
f27d273
Merge branch 'development' into FME-12349-fallback-treatments_baseline
EmilianoSanchez Jan 27, 2026
5ded361
Merge pull request #179 from splitio/FME-12349-fallback-treatments-web
EmilianoSanchez Jan 27, 2026
5aa3e57
Merge branch 'FME-12349-fallback-treatments_baseline' into FME-12349-…
EmilianoSanchez Jan 27, 2026
c126f94
Switch dependencies to local path references for development
EmilianoSanchez Jan 27, 2026
0898585
Update splitio_android/android/build.gradle
EmilianoSanchez Jan 28, 2026
f41ea90
Merge pull request #180 from splitio/FME-12349-fallback-treatments-mo…
EmilianoSanchez Jan 28, 2026
be61d4c
prepare release
EmilianoSanchez Jan 28, 2026
408ccb8
add public_member_api_docs rule
EmilianoSanchez Jan 28, 2026
a91a50d
Merge pull request #182 from splitio/linter
EmilianoSanchez Jan 28, 2026
98fc519
Update CHANGELOG entries
EmilianoSanchez Jan 28, 2026
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
25 changes: 18 additions & 7 deletions splitio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# 1.2.1 (Jan 28, 2026)
* Bug fix: corrected asset path for loading the Browser SDK.

# 1.2.1-rc.1 (Jan 28, 2026)

# 1.2.0 (Jan 28, 2026)
* Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.
* Updated Android SDK to `5.4.2`, iOS SDK to `3.6.0`, and Browser SDK to `1.6.1`

# 1.2.0-rc.1 (Jan 28, 2026)

# 1.1.0 (Jan 16, 2026)
- Added Web support via the `splitio_web` package, the Web implementation of `splitio` based on the Split Browser SDK `1.6.0`.
* Added Web support via the `splitio_web` package, the Web implementation of `splitio` based on the Split Browser SDK `1.6.0`.

# 1.1.0-rc.1 (Jan 15, 2026)

# 1.0.0 (Aug 14, 2025)
- Updated Android SDK to `5.3.1` & iOS SDK to `3.3.2`
- Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK.
- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.
- Added two new configuration options to control the behavior of the persisted rollout plan cache. Use `rolloutCacheConfiguration` in the config.
- Added a new optional argument to the client `getTreatment` methods to allow passing additional evaluation options, such as a map of properties to append to the generated impressions sent to Split backend. Read more in our docs.
- Added support for the new impressions tracking toggle available on feature flags, both respecting the setting and including the new field being returned on SplitView type objects. Read more in our docs.
* Updated Android SDK to `5.3.1` & iOS SDK to `3.3.2`
* Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK.
* Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.
* Added two new configuration options to control the behavior of the persisted rollout plan cache. Use `rolloutCacheConfiguration` in the config.
* Added a new optional argument to the client `getTreatment` methods to allow passing additional evaluation options, such as a map of properties to append to the generated impressions sent to Split backend. Read more in our docs.
* Added support for the new impressions tracking toggle available on feature flags, both respecting the setting and including the new field being returned on SplitView type objects. Read more in our docs.

# 1.0.0-rc.1 (Aug 14, 2025)

Expand Down
4 changes: 4 additions & 0 deletions splitio/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

linter:
rules:
- public_member_api_docs
12 changes: 6 additions & 6 deletions splitio/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PODS:
- Flutter (1.0.0)
- Split (3.3.2)
- splitio_ios (0.8.0):
- Split (3.6.0)
- splitio_ios (0.9.0):
- Flutter
- Split (~> 3.3.2)
- Split (~> 3.6.0)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -20,9 +20,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/splitio_ios/ios"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Split: 0d4962a6c15180e1857c1a3753e1ae9c91a6150b
splitio_ios: 438ad21d0dfe467670f8b9508773b77b16a71d6b
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
Split: 1e2176aacd6421029bea41413401389d86e3d50a
splitio_ios: ad4f484a6c478bf7285e417ea8252371f66b54ff

PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

Expand Down
2 changes: 2 additions & 0 deletions splitio/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: avoid_print

import 'package:flutter/material.dart';
import 'package:splitio/splitio.dart';

Expand Down
18 changes: 9 additions & 9 deletions splitio/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,39 +171,39 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.2.1"
splitio_android:
dependency: transitive
description:
name: splitio_android
sha256: "344bf82de6694cffb8dd80a96ee734e31bb838d2b4693fb046e0fc98e31512ca"
sha256: "7c0e5ad4ccdf4990120a7a6a2f067d274c107ab9830fd20b1d54bf3f0392ac02"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.0"
splitio_ios:
dependency: transitive
description:
name: splitio_ios
sha256: "1c078bc49bf7b30df6ca50accb6a9eecf592ec607e20e77b1c6ecdabc7a44dc9"
sha256: c15cd7dfd195df107ae07c030fd742dcabb0610c769466d6d7e3890d22a91bc2
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.0"
splitio_platform_interface:
dependency: transitive
description:
name: splitio_platform_interface
sha256: "8bcb1cab9f5fffb7b79cfeeaf6c80d82f8ede55c8d6ca7578ec78653f3f9e499"
sha256: faa022814c7b2fc7b5f68b80b088e1638e06783419075176d1adadcf787897db
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.1.0"
splitio_web:
dependency: transitive
description:
name: splitio_web
sha256: "29dc1a55d80c026afb0f0bad378c81e44ee1e9da5faaf9e931f35b5dfd3ff5f3"
sha256: "656cf71d4ec900cf1ad1b9eae20bbabe797de5c99f49584672161de9fe133afb"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.1"
stack_trace:
dependency: transitive
description:
Expand Down
3 changes: 3 additions & 0 deletions splitio/lib/split_client.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:splitio_platform_interface/splitio_platform_interface.dart';

/// Abstract class representing a Split client.
abstract class SplitClient {
/// Performs an evaluation for the [featureFlagName] feature flag.
///
Expand Down Expand Up @@ -187,11 +188,13 @@ abstract class SplitClient {
Future<SplitClient> whenTimeout();
}

/// Default implementation of the Split client.
class DefaultSplitClient implements SplitClient {
final SplitioPlatform _platform;
final String _matchingKey;
final String? _bucketingKey;

/// Creates a new instance of the Split client.
DefaultSplitClient(this._platform, this._matchingKey, this._bucketingKey);

@override
Expand Down
14 changes: 14 additions & 0 deletions splitio/lib/splitio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ export 'package:splitio_platform_interface/split_view.dart';
export 'package:splitio_platform_interface/split_certificate_pinning_configuration.dart';
export 'package:splitio_platform_interface/split_evaluation_options.dart';
export 'package:splitio_platform_interface/split_rollout_cache_configuration.dart';
export 'package:splitio_platform_interface/split_fallback_treatment.dart';
export 'package:splitio_platform_interface/split_fallback_treatments_configuration.dart';

/// Callback function type for client readiness events.
typedef ClientReadinessCallback = void Function(SplitClient splitClient);

/// Main class for interacting with the Split Flutter SDK.
class Splitio {
final String _sdkKey;

Expand Down Expand Up @@ -112,12 +116,14 @@ class Splitio {
return client;
}

/// Gets the list of all feature flag names.
Future<List<String>> splitNames() async {
List<String> splitNames = await _platform.splitNames();

return splitNames;
}

/// Gets the list of all feature flag views.
Future<List<SplitView>> splits() async {
return _platform.splits();
}
Expand All @@ -128,14 +134,22 @@ class Splitio {
return _platform.impressionsStream();
}

/// Gets a specific feature flag view.
///
/// Returns null if the provided feature flag name is not found.
Future<SplitView?> split(String splitName) async {
return _platform.split(splitName: splitName);
}

/// Gets the user consent status.
Future<UserConsent> getUserConsent() async {
return _platform.getUserConsent();
}

/// Sets the user consent status.
///
/// [enabled] is a boolean that enables (`UserConsent.granted`)
/// or disables (`UserConsent.declined`) data collection.
Future<void> setUserConsent(bool enabled) async {
return _platform.setUserConsent(enabled);
}
Expand Down
10 changes: 5 additions & 5 deletions splitio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: splitio
description: Official plugin for split.io, the platform for controlled rollouts, which serves features to your users via feature flags to manage your complete customer experience.
version: 1.1.0
version: 1.2.1
homepage: https://split.io/
repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio/

Expand All @@ -21,10 +21,10 @@ flutter:
dependencies:
flutter:
sdk: flutter
splitio_android: ^1.0.0
splitio_ios: ^1.0.0
splitio_web: ^1.0.0
splitio_platform_interface: ^2.0.0
splitio_android: ^1.1.0
splitio_ios: ^1.1.0
splitio_web: ^1.1.1
splitio_platform_interface: ^2.1.0
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
8 changes: 7 additions & 1 deletion splitio_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 1.1.0 (Jan 28, 2026)
* Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.
* Updated Android SDK to `5.4.2`.

# 1.1.0-rc.1 (Jan 28, 2026)

# 1.0.0 (Aug 14, 2025)
- Updated Android SDK to `5.3.1`.
* Updated Android SDK to `5.3.1`.

# 1.0.0-rc.1 (Aug 14, 2025)

Expand Down
4 changes: 4 additions & 0 deletions splitio_android/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

linter:
rules:
- public_member_api_docs
2 changes: 1 addition & 1 deletion splitio_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
}

dependencies {
implementation 'io.split.client:android-client:5.3.1'
implementation 'io.split.client:android-client:5.4.2'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.12.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import io.split.android.client.network.CertificatePinningConfiguration;
import io.split.android.client.shared.UserConsent;
import io.split.android.client.utils.logger.SplitLogLevel;
import io.split.android.client.fallback.FallbackTreatmentsConfiguration;
import io.split.android.client.fallback.FallbackTreatment;

class SplitClientConfigHelper {

Expand Down Expand Up @@ -55,6 +57,11 @@ class SplitClientConfigHelper {
private static final String ROLLOUT_CACHE_CONFIGURATION = "rolloutCacheConfiguration";
private static final String ROLLOUT_CACHE_CONFIGURATION_EXPIRATION = "expirationDays";
private static final String ROLLOUT_CACHE_CONFIGURATION_CLEAR_ON_INIT = "clearOnInit";
private static final String FALLBACK_TREATMENTS = "fallbackTreatments";
private static final String FALLBACK_TREATMENTS_GLOBAL = "global";
private static final String FALLBACK_TREATMENTS_BY_FLAG = "byFlag";
private static final String FALLBACK_TREATMENT_VALUE = "treatment";
private static final String FALLBACK_TREATMENT_CONFIG = "config";

/**
* Creates a {@link SplitClientConfig} object from a map.
Expand Down Expand Up @@ -262,6 +269,29 @@ static SplitClientConfig fromMap(@NonNull Map<String, Object> configurationMap,
}
}

Map<String, Object> fallbackTreatments = getObjectMap(configurationMap, FALLBACK_TREATMENTS);
if (fallbackTreatments != null) {
Map<String, Object> global = getObjectMap(fallbackTreatments, FALLBACK_TREATMENTS_GLOBAL);
Map<String, Object> byFlag = getObjectMap(fallbackTreatments, FALLBACK_TREATMENTS_BY_FLAG);
if (global != null || byFlag != null) {
FallbackTreatmentsConfiguration.Builder fallbackTreatmentsBuilder = FallbackTreatmentsConfiguration.builder();
if (global != null) {
fallbackTreatmentsBuilder.global(new FallbackTreatment(getString(global, FALLBACK_TREATMENT_VALUE), getString(global, FALLBACK_TREATMENT_CONFIG)));
}
if (byFlag != null) {
Map<String, FallbackTreatment> byFlagMap = new HashMap<>();
for (Map.Entry<String, Object> entry : byFlag.entrySet()) {
Map<String, Object> byFlagFallbackTreatment = getObjectMap(byFlag, entry.getKey());
if (byFlagFallbackTreatment != null) {
byFlagMap.put(entry.getKey(), new FallbackTreatment(getString(byFlagFallbackTreatment, FALLBACK_TREATMENT_VALUE), getString(byFlagFallbackTreatment, FALLBACK_TREATMENT_CONFIG)));
}
}
fallbackTreatmentsBuilder.byFlag(byFlagMap);
}
builder.fallbackTreatments(fallbackTreatmentsBuilder.build());
}
}

return builder.serviceEndpoints(serviceEndpointsBuilder.build()).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import io.split.android.client.utils.logger.LogPrinter;
import io.split.android.client.utils.logger.Logger;
import io.split.android.client.utils.logger.SplitLogLevel;
import io.split.android.client.fallback.FallbackTreatmentsConfiguration;
import io.split.android.client.fallback.FallbackTreatment;

public class SplitClientConfigHelperTest {

Expand Down Expand Up @@ -235,4 +237,33 @@ public void rolloutCacheConfigurationValuesAreMappedCorrectly() {
assertEquals(5, splitClientConfig.rolloutCacheConfiguration().getExpirationDays());
assertTrue(splitClientConfig.rolloutCacheConfiguration().isClearOnInit());
}

@Test
public void fallbackTreatmentsValuesAreMappedCorrectly() {
Map<String, Object> globalFallbackTreatment = new HashMap<>();
globalFallbackTreatment.put("treatment", "global-control");
globalFallbackTreatment.put("config", "global-config");

Map<String, Object> feature1FallbackTreatment = new HashMap<>();
feature1FallbackTreatment.put("treatment", "feature1-control");
feature1FallbackTreatment.put("config", null);

Map<String, Object> byFlagFallbackTreatments = new HashMap<>();
byFlagFallbackTreatments.put("feature1", feature1FallbackTreatment);

Map<String, Object> fallbackTreatmentsValues = new HashMap<>();
fallbackTreatmentsValues.put("global", globalFallbackTreatment);
fallbackTreatmentsValues.put("byFlag", byFlagFallbackTreatments);

Map<String, Object> configValues = new HashMap<>();
configValues.put("fallbackTreatments", fallbackTreatmentsValues);

SplitClientConfig splitClientConfig = SplitClientConfigHelper
.fromMap(configValues, mock(ImpressionListener.class));

FallbackTreatmentsConfiguration fallbackTreatmentsConfiguration = splitClientConfig.fallbackTreatments();

assertEquals(new FallbackTreatment("global-control", "global-config"), fallbackTreatmentsConfiguration.getGlobal());
assertEquals(Map.of("feature1", new FallbackTreatment("feature1-control", null)), fallbackTreatmentsConfiguration.getByFlag());
}
}
4 changes: 2 additions & 2 deletions splitio_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: splitio_android
description: The official Android implementation of splitio Flutter plugin.
repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio_android
version: 1.0.0
version: 1.1.0

environment:
sdk: ">=2.16.2 <4.0.0"
Expand All @@ -19,7 +19,7 @@ flutter:
dependencies:
flutter:
sdk: flutter
splitio_platform_interface: ^2.0.0
splitio_platform_interface: ^2.1.0

dev_dependencies:
flutter_test:
Expand Down
8 changes: 7 additions & 1 deletion splitio_ios/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 1.1.0 (Jan 28, 2026)
* Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.
* Updated iOS SDK to `3.6.0`.

# 1.1.0-rc.1 (Jan 28, 2026)

# 1.0.0 (Aug 14, 2025)
- iOS SDK to `3.3.2`
* Updated iOS SDK to `3.3.2`

# 1.0.0-rc.1 (Aug 14, 2025)

Expand Down
4 changes: 4 additions & 0 deletions splitio_ios/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

linter:
rules:
- public_member_api_docs
Loading