diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0757780..0b1846b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -72,3 +72,27 @@ jobs:
- name: ios
run: cd splitio_ios/example/ios; xcodebuild test -workspace "Runner.xcworkspace" -scheme "Runner" -destination "platform=iOS Simulator,name=iPhone 15,OS=17.4" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO ONLY_ACTIVE_ARCH=NO;
+
+ build-web:
+ name: Build Web
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: subosito/flutter-action@v2
+ with:
+ channel: 'stable'
+ - name: Build Web
+ run: cd splitio/example; flutter build web
+
+ test-web:
+ name: Test Web
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: subosito/flutter-action@v2
+ with:
+ channel: 'stable'
+ - name: Build Web
+ run: cd splitio/example; flutter build web
+ - name: Run Web test
+ run: cd splitio/example; flutter test --platform=chrome
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index eb7e486..3a4a238 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -25,3 +25,5 @@ jobs:
run: cd splitio_android/; flutter test
- name: Run flutter splitio_ios test
run: cd splitio_ios/; flutter test
+ - name: Run flutter splitio_web test
+ run: cd splitio_web/; flutter test --platform=chrome
diff --git a/CONTRIBUTORS-GUIDE.md b/CONTRIBUTORS-GUIDE.md
index 9c1427c..dfe5b77 100644
--- a/CONTRIBUTORS-GUIDE.md
+++ b/CONTRIBUTORS-GUIDE.md
@@ -22,7 +22,9 @@ Instructions on how to run automated tests
Run `flutter test` in root directory.
-Run unit tests in android & ios packages.
+Run unit tests in Android & iOS packages with `flutter test`.
+
+Run unit tests in Web package with `flutter test --platform chrome`.
# Contact
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/splitio/CHANGELOG.md b/splitio/CHANGELOG.md
index 057ee4c..f408594 100644
--- a/splitio/CHANGELOG.md
+++ b/splitio/CHANGELOG.md
@@ -1,3 +1,5 @@
+# 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.
diff --git a/splitio/LICENSE b/splitio/LICENSE
index 4b08bc6..d645695 100644
--- a/splitio/LICENSE
+++ b/splitio/LICENSE
@@ -176,7 +176,18 @@
END OF TERMS AND CONDITIONS
- Copyright © 2026 Split Software, Inc.
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/splitio/README.md b/splitio/README.md
index 7d2b918..c8181d0 100644
--- a/splitio/README.md
+++ b/splitio/README.md
@@ -6,9 +6,9 @@ This is the official Flutter plugin designed to work with Split, the platform fo
[](https://twitter.com/intent/follow?screen_name=splitsoftware)
## Compatibility
-| | Android | iOS |
-|----------------|---------|----------|
-| **Support** | SDK 21+ | iOS 9+ |
+| | Android | iOS | Web |
+|----------------|---------|---------|---------|
+| **Support** | SDK 21+ | iOS 12+ | Any |
## Getting started
@@ -57,21 +57,24 @@ To learn more about Split, contact hello@split.io, or get started with feature f
Split has built and maintains SDKs for:
-* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
-* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
-* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
-* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
-* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
-* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
-* Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
-* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
-* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
-* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
-* React [Github](https://github.com/splitio/react-client) [Docs](https://help.split.io/hc/en-us/articles/360038825091-React-SDK)
-* React Native [Github](https://github.com/splitio/react-native-client) [Docs](https://help.split.io/hc/en-us/articles/4406066357901-React-Native-SDK)
-* Redux [Github](https://github.com/splitio/redux-client) [Docs](https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK)
-* Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK)
-* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
+* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/net-sdk/)
+* Android [Github](https://github.com/splitio/android-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/android-sdk/)
+* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/angular-utilities/)
+* Elixir thin-client [Github](https://github.com/splitio/elixir-thin-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/elixir-thin-client-sdk/)
+* Flutter [Github](https://github.com/splitio/flutter-sdk-plugin) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/flutter-plugin/)
+* GO [Github](https://github.com/splitio/go-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/go-sdk/)
+* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/ios-sdk/)
+* Java [Github](https://github.com/splitio/java-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/java-sdk/)
+* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/javascript-sdk/)
+* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/)
+* Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/nodejs-sdk/)
+* PHP [Github](https://github.com/splitio/php-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/php-sdk/)
+* PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/php-thin-client-sdk/)
+* Python [Github](https://github.com/splitio/python-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/python-sdk/)
+* React [Github](https://github.com/splitio/react-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/react-sdk/)
+* React Native [Github](https://github.com/splitio/react-native-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/react-native-sdk/)
+* Redux [Github](https://github.com/splitio/redux-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/redux-sdk/)
+* Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/ruby-sdk/)
For a comprehensive list of open source projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
diff --git a/splitio/example/pubspec.lock b/splitio/example/pubspec.lock
index 624c7f2..84dd99d 100644
--- a/splitio/example/pubspec.lock
+++ b/splitio/example/pubspec.lock
@@ -75,30 +75,35 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
+ flutter_web_plugins:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
- sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.9"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.9"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
lints:
dependency: transitive
description:
@@ -127,10 +132,10 @@ packages:
dependency: transitive
description:
name: meta
- sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+ sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
path:
dependency: transitive
description:
@@ -166,28 +171,38 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.0-rc.1"
+ version: "1.0.0"
splitio_android:
dependency: transitive
description:
- path: "../../splitio_android"
- relative: true
- source: path
- version: "1.0.0-rc.1"
+ name: splitio_android
+ sha256: "344bf82de6694cffb8dd80a96ee734e31bb838d2b4693fb046e0fc98e31512ca"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
splitio_ios:
dependency: transitive
description:
- path: "../../splitio_ios"
- relative: true
- source: path
- version: "1.0.0-rc.1"
+ name: splitio_ios
+ sha256: "1c078bc49bf7b30df6ca50accb6a9eecf592ec607e20e77b1c6ecdabc7a44dc9"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
splitio_platform_interface:
dependency: transitive
description:
- path: "../../splitio_platform_interface"
+ name: splitio_platform_interface
+ sha256: "8bcb1cab9f5fffb7b79cfeeaf6c80d82f8ede55c8d6ca7578ec78653f3f9e499"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.0"
+ splitio_web:
+ dependency: transitive
+ description:
+ path: "../../splitio_web"
relative: true
source: path
- version: "2.0.0-rc.1"
+ version: "1.0.0-rc.1"
stack_trace:
dependency: transitive
description:
@@ -224,18 +239,18 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
+ sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.dev"
source: hosted
- version: "0.7.4"
+ version: "0.7.7"
vector_math:
dependency: transitive
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.2.0"
vm_service:
dependency: transitive
description:
@@ -244,6 +259,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "15.0.0"
+ web:
+ dependency: transitive
+ description:
+ name: web
+ sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
sdks:
- dart: ">=3.7.0-0 <4.0.0"
- flutter: ">=3.18.0-18.0.pre.54"
+ dart: ">=3.8.0-0 <4.0.0"
+ flutter: ">=3.19.0"
diff --git a/splitio/example/test/example_smoke_test.dart b/splitio/example/test/example_smoke_test.dart
new file mode 100644
index 0000000..c260055
--- /dev/null
+++ b/splitio/example/test/example_smoke_test.dart
@@ -0,0 +1,18 @@
+// This is a basic Flutter widget test.
+//
+// To perform an interaction with a widget in your test, use the WidgetTester
+// utility in the flutter_test package. For example, you can send tap and scroll
+// gestures. You can also use WidgetTester to find child widgets in the widget
+// tree, read text, and verify that the values of widget properties are correct.
+
+import 'package:flutter_test/flutter_test.dart';
+
+import 'package:splitio_example/main.dart';
+
+void main() {
+ testWidgets('SplitioExampleApp smoke test', (WidgetTester tester) async {
+ await tester.pumpWidget(const SplitioExampleApp());
+ // await tester.pump(const Duration(milliseconds: 100));
+ expect(find.text('split.io example app'), findsOneWidget);
+ });
+}
diff --git a/splitio/example/web/favicon.png b/splitio/example/web/favicon.png
new file mode 100644
index 0000000..8aaa46a
Binary files /dev/null and b/splitio/example/web/favicon.png differ
diff --git a/splitio/example/web/icons/Icon-192.png b/splitio/example/web/icons/Icon-192.png
new file mode 100644
index 0000000..b749bfe
Binary files /dev/null and b/splitio/example/web/icons/Icon-192.png differ
diff --git a/splitio/example/web/icons/Icon-512.png b/splitio/example/web/icons/Icon-512.png
new file mode 100644
index 0000000..88cfd48
Binary files /dev/null and b/splitio/example/web/icons/Icon-512.png differ
diff --git a/splitio/example/web/icons/Icon-maskable-192.png b/splitio/example/web/icons/Icon-maskable-192.png
new file mode 100644
index 0000000..eb9b4d7
Binary files /dev/null and b/splitio/example/web/icons/Icon-maskable-192.png differ
diff --git a/splitio/example/web/icons/Icon-maskable-512.png b/splitio/example/web/icons/Icon-maskable-512.png
new file mode 100644
index 0000000..d69c566
Binary files /dev/null and b/splitio/example/web/icons/Icon-maskable-512.png differ
diff --git a/splitio/example/web/index.html b/splitio/example/web/index.html
new file mode 100644
index 0000000..6d72a53
--- /dev/null
+++ b/splitio/example/web/index.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ splitio_example
+
+
+
+
+
+
+
diff --git a/splitio/example/web/manifest.json b/splitio/example/web/manifest.json
new file mode 100644
index 0000000..142b95a
--- /dev/null
+++ b/splitio/example/web/manifest.json
@@ -0,0 +1,35 @@
+{
+ "name": "splitio_example",
+ "short_name": "splitio_example",
+ "start_url": ".",
+ "display": "standalone",
+ "background_color": "#0175C2",
+ "theme_color": "#0175C2",
+ "description": "A new Flutter project.",
+ "orientation": "portrait-primary",
+ "prefer_related_applications": false,
+ "icons": [
+ {
+ "src": "icons/Icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-maskable-192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "maskable"
+ },
+ {
+ "src": "icons/Icon-maskable-512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "maskable"
+ }
+ ]
+}
diff --git a/splitio/lib/splitio.dart b/splitio/lib/splitio.dart
index 948c0b7..82e4bfa 100644
--- a/splitio/lib/splitio.dart
+++ b/splitio/lib/splitio.dart
@@ -11,6 +11,7 @@ export 'package:splitio_platform_interface/split_sync_config.dart';
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';
typedef ClientReadinessCallback = void Function(SplitClient splitClient);
diff --git a/splitio/pubspec.yaml b/splitio/pubspec.yaml
index 05216c1..4fe89cd 100644
--- a/splitio/pubspec.yaml
+++ b/splitio/pubspec.yaml
@@ -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.0.0
+version: 1.1.0-rc.1
homepage: https://split.io/
repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio/
@@ -15,12 +15,15 @@ flutter:
default_package: splitio_android
ios:
default_package: splitio_ios
+ web:
+ default_package: splitio_web
dependencies:
flutter:
sdk: flutter
splitio_android: ^1.0.0
splitio_ios: ^1.0.0
+ splitio_web: ^1.0.0-rc.1
splitio_platform_interface: ^2.0.0
dev_dependencies:
flutter_test:
diff --git a/splitio_android/LICENSE b/splitio_android/LICENSE
index 4b08bc6..d645695 100644
--- a/splitio_android/LICENSE
+++ b/splitio_android/LICENSE
@@ -176,7 +176,18 @@
END OF TERMS AND CONDITIONS
- Copyright © 2026 Split Software, Inc.
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/splitio_ios/LICENSE b/splitio_ios/LICENSE
index 4b08bc6..d645695 100644
--- a/splitio_ios/LICENSE
+++ b/splitio_ios/LICENSE
@@ -176,7 +176,18 @@
END OF TERMS AND CONDITIONS
- Copyright © 2026 Split Software, Inc.
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/splitio_ios/example/pubspec.lock b/splitio_ios/example/pubspec.lock
index 5d236bc..234d4e3 100644
--- a/splitio_ios/example/pubspec.lock
+++ b/splitio_ios/example/pubspec.lock
@@ -79,26 +79,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.9"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.9"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
lints:
dependency: transitive
description:
@@ -127,10 +127,10 @@ packages:
dependency: transitive
description:
name: meta
- sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+ sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
path:
dependency: transitive
description:
@@ -166,14 +166,15 @@ packages:
path: ".."
relative: true
source: path
- version: "1.0.0-rc.1"
+ version: "1.0.0"
splitio_platform_interface:
dependency: transitive
description:
- path: "../../splitio_platform_interface"
- relative: true
- source: path
- version: "2.0.0-rc.1"
+ name: splitio_platform_interface
+ sha256: "8bcb1cab9f5fffb7b79cfeeaf6c80d82f8ede55c8d6ca7578ec78653f3f9e499"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.0"
stack_trace:
dependency: transitive
description:
@@ -210,18 +211,18 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
+ sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.dev"
source: hosted
- version: "0.7.4"
+ version: "0.7.7"
vector_math:
dependency: transitive
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.2.0"
vm_service:
dependency: transitive
description:
@@ -231,5 +232,5 @@ packages:
source: hosted
version: "15.0.0"
sdks:
- dart: ">=3.7.0-0 <4.0.0"
+ dart: ">=3.8.0-0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
diff --git a/splitio_platform_interface/LICENSE b/splitio_platform_interface/LICENSE
index 4b08bc6..d645695 100644
--- a/splitio_platform_interface/LICENSE
+++ b/splitio_platform_interface/LICENSE
@@ -176,7 +176,18 @@
END OF TERMS AND CONDITIONS
- Copyright © 2026 Split Software, Inc.
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/splitio_platform_interface/lib/split_configuration.dart b/splitio_platform_interface/lib/split_configuration.dart
index ffe9a9d..1d54fdd 100644
--- a/splitio_platform_interface/lib/split_configuration.dart
+++ b/splitio_platform_interface/lib/split_configuration.dart
@@ -21,7 +21,7 @@ class SplitConfiguration {
///
/// [eventFlushInterval] When using .track, how often the events queue is flushed to Split servers.
///
- /// [eventsPerPush] Maximum size of the batch to push events.
+ /// [eventsPerPush] Maximum size of the batch to push events. Not supported in Web.
///
/// [trafficType] The default traffic type for events tracked using the track method. If not specified, every track call should specify a traffic type.
///
@@ -29,7 +29,7 @@ class SplitConfiguration {
///
/// [streamingEnabled] Boolean flag to enable the streaming service as default synchronization mechanism when in foreground. In the event of an issue with streaming, the SDK will fallback to the polling mechanism. If false, the SDK will poll for changes as usual without attempting to use streaming.
///
- /// [persistentAttributesEnabled] Enables saving attributes on persistent cache which is loaded as part of the SDK_READY_FROM_CACHE flow. All functions that mutate the stored attributes map affect the persistent cache.
+ /// [persistentAttributesEnabled] Enables saving attributes on persistent cache which is loaded as part of the SDK_READY_FROM_CACHE flow. All functions that mutate the stored attributes map affect the persistent cache. Not supported in Web.
///
/// [impressionListener] Enables impression listener. If true, generated impressions will be streamed in the impressionsStream() method of Splitio.
///
@@ -41,13 +41,13 @@ class SplitConfiguration {
///
/// [userConsent] User consent status used to control the tracking of events and impressions. Possible values are [UserConsent.granted], [UserConsent.declined], and [UserConsent.unknown].
///
- /// [encryptionEnabled] If set to true, the local database contents is encrypted. Defaults to false.
+ /// [encryptionEnabled] If set to true, the local database contents is encrypted. Defaults to false. Not supported in Web.
///
/// [logLevel] Enables logging according to the level specified. Options are [SplitLogLevel.verbose], [SplitLogLevel.none], [SplitLogLevel.debug], [SplitLogLevel.info], [SplitLogLevel.warning], and [SplitLogLevel.error].
///
/// [readyTimeout] Maximum amount of time in seconds to wait before firing the SDK_READY_TIMED_OUT event. Defaults to 10 seconds.
///
- /// [certificatePinningConfiguration] Certificate pinning configuration. Pins need to have the format of a base64 SHA-256 or base64 SHA-1 hashes of the SPKI (ex.: "sha256/7HIpactkIAq2Y49orFOOQKurWxmmSFZhBCoQYcRhJ3Y=").
+ /// [certificatePinningConfiguration] Certificate pinning configuration. Pins need to have the format of a base64 SHA-256 or base64 SHA-1 hashes of the SPKI (ex.: "sha256/7HIpactkIAq2Y49orFOOQKurWxmmSFZhBCoQYcRhJ3Y="). Not supported in Web.
SplitConfiguration({
int? featuresRefreshRate,
int? segmentsRefreshRate,
diff --git a/splitio_web/.gitignore b/splitio_web/.gitignore
new file mode 100644
index 0000000..9be145f
--- /dev/null
+++ b/splitio_web/.gitignore
@@ -0,0 +1,29 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+/pubspec.lock
+**/doc/api/
+.dart_tool/
+.packages
+build/
diff --git a/splitio_web/CHANGELOG.md b/splitio_web/CHANGELOG.md
new file mode 100644
index 0000000..ed7e3be
--- /dev/null
+++ b/splitio_web/CHANGELOG.md
@@ -0,0 +1,4 @@
+# 1.0.0 (January 16, 2026)
+- Initial release.
+
+# 1.0.0-rc.1 (January 15, 2026)
diff --git a/splitio_web/LICENSE b/splitio_web/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/splitio_web/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/splitio_web/README.md b/splitio_web/README.md
new file mode 100644
index 0000000..d6edd8a
--- /dev/null
+++ b/splitio_web/README.md
@@ -0,0 +1,15 @@
+# splitio_web
+
+The Web implementation of [`splitio`][1].
+
+This package integrates the [Split Browser SDK][2]
+to provide feature flag functionality for Flutter Web applications.
+
+## Usage
+
+This package is [endorsed][3], which means you can simply use `splitio`
+normally. This package will be automatically included in your app when you do.
+
+[1]: https://pub.dev/packages/splitio
+[2]: https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/
+[3]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
diff --git a/splitio_web/lib/splitio_web.dart b/splitio_web/lib/splitio_web.dart
new file mode 100644
index 0000000..fb938f9
--- /dev/null
+++ b/splitio_web/lib/splitio_web.dart
@@ -0,0 +1,866 @@
+import 'dart:async';
+import 'dart:js_interop';
+import 'package:flutter_web_plugins/flutter_web_plugins.dart' show Registrar;
+import 'package:splitio_platform_interface/splitio_platform_interface.dart';
+import 'package:splitio_web/src/js_interop.dart';
+import 'package:web/web.dart';
+
+extension on Window {
+ @JS()
+ external JS_BrowserSDKPackage? splitio;
+}
+
+/// Web implementation of [SplitioPlatform].
+class SplitioWeb extends SplitioPlatform {
+ /// Registers this class as the default platform implementation.
+ static void registerWith(Registrar registrar) {
+ SplitioPlatform.instance = SplitioWeb();
+ }
+
+ // Future to queue method calls until SDK is initialized
+ Future? _initFuture;
+
+ late JS_IBrowserSDK _factory;
+ String? _trafficType;
+ // Broadcast to allow users to subscribe multiple listeners
+ final StreamController _impressionsStreamController =
+ StreamController.broadcast();
+
+ final Map _clients = {};
+
+ @override
+ Future init({
+ required String apiKey,
+ required String matchingKey,
+ required String? bucketingKey,
+ SplitConfiguration? sdkConfiguration,
+ }) {
+ if (_initFuture == null) {
+ _initFuture = this._init(
+ apiKey: apiKey,
+ matchingKey: matchingKey,
+ bucketingKey: bucketingKey,
+ sdkConfiguration: sdkConfiguration);
+ }
+ return _initFuture!;
+ }
+
+ Future _init({
+ required String apiKey,
+ required String matchingKey,
+ required String? bucketingKey,
+ SplitConfiguration? sdkConfiguration,
+ }) async {
+ await _loadSplitSdk();
+
+ final config =
+ _buildConfig(apiKey, matchingKey, bucketingKey, sdkConfiguration);
+
+ // Create factory instance
+ this._factory = window.splitio!.SplitFactory(config);
+
+ if (sdkConfiguration != null) {
+ if (sdkConfiguration.configurationMap['trafficType'] is String) {
+ this._trafficType = sdkConfiguration.configurationMap['trafficType'];
+ }
+
+ // Log warnings regarding unsupported configs. Not done in _buildConfig to reuse the factory logger
+ final unsupportedConfigs = [
+ 'certificatePinningConfiguration',
+ 'encryptionEnabled',
+ 'eventsPerPush',
+ 'persistentAttributesEnabled'
+ ];
+ for (final configName in unsupportedConfigs) {
+ if (sdkConfiguration.configurationMap[configName] != null) {
+ this._factory.settings.log.warn(
+ 'Config $configName is not supported by the Web package. This config will be ignored.'
+ .toJS);
+ }
+ }
+ }
+
+ return;
+ }
+
+ // Checks whether the Split Browser SDK was manually loaded (`window.splitio != null`).
+ // If not, loads it by injecting a script tag.
+ static Future _loadSplitSdk() async {
+ if (window.splitio != null) {
+ return; // Already loaded. JS SDK should not be manually loaded because `splitio.SplitFactory` is not available.
+ }
+
+ // Create and inject script tag
+ final script = document.createElement('script') as HTMLScriptElement;
+ script.type = 'text/javascript';
+ script.src =
+ 'assets/packages/splitio_web/web/split-browser-1.6.0.full.min.js';
+
+ // Wait for script to load
+ final completer = Completer();
+
+ script.onload = (Event event) {
+ completer.complete();
+ }.toJS;
+
+ script.onerror = (Event event) {
+ completer.completeError(
+ Exception('Failed to load Split Browser SDK, with error: $event'));
+ }.toJS;
+
+ document.head!.appendChild(script);
+
+ await completer.future;
+
+ if (window.splitio == null) {
+ throw Exception('Split Browser SDK failed to initialize after loading');
+ }
+ }
+
+ // Map SplitConfiguration to JS equivalent object
+ JS_Configuration _buildConfig(String apiKey, String matchingKey,
+ String? bucketingKey, SplitConfiguration? configuration) {
+ final config = JSObject() as JS_Configuration;
+
+ final core = JSObject() as JS_ConfigurationCore;
+ core.authorizationKey = apiKey.toJS;
+ core.key = buildJsKey(matchingKey, bucketingKey);
+ config.core = core;
+
+ if (configuration != null) {
+ final scheduler = JSObject() as JS_ConfigurationScheduler;
+ if (configuration.configurationMap.containsKey('featuresRefreshRate'))
+ scheduler.featuresRefreshRate =
+ (configuration.configurationMap['featuresRefreshRate'] as int).toJS;
+ if (configuration.configurationMap.containsKey('segmentsRefreshRate'))
+ scheduler.segmentsRefreshRate =
+ (configuration.configurationMap['segmentsRefreshRate'] as int).toJS;
+ if (configuration.configurationMap.containsKey('impressionsRefreshRate'))
+ scheduler.impressionsRefreshRate =
+ (configuration.configurationMap['impressionsRefreshRate'] as int)
+ .toJS;
+ if (configuration.configurationMap.containsKey('telemetryRefreshRate'))
+ scheduler.telemetryRefreshRate =
+ (configuration.configurationMap['telemetryRefreshRate'] as int)
+ .toJS;
+ if (configuration.configurationMap.containsKey('eventsQueueSize'))
+ scheduler.eventsQueueSize =
+ (configuration.configurationMap['eventsQueueSize'] as int).toJS;
+ if (configuration.configurationMap.containsKey('impressionsQueueSize'))
+ scheduler.impressionsQueueSize =
+ (configuration.configurationMap['impressionsQueueSize'] as int)
+ .toJS;
+ if (configuration.configurationMap.containsKey('eventFlushInterval'))
+ scheduler.eventsPushRate =
+ (configuration.configurationMap['eventFlushInterval'] as int).toJS;
+ config.scheduler = scheduler;
+
+ if (configuration.configurationMap.containsKey('streamingEnabled'))
+ config.streamingEnabled =
+ (configuration.configurationMap['streamingEnabled'] as bool).toJS;
+
+ final urls = JSObject() as JS_ConfigurationUrls;
+ if (configuration.configurationMap.containsKey('sdkEndpoint'))
+ urls.sdk =
+ (configuration.configurationMap['sdkEndpoint'] as String).toJS;
+ if (configuration.configurationMap.containsKey('eventsEndpoint'))
+ urls.events =
+ (configuration.configurationMap['eventsEndpoint'] as String).toJS;
+
+ // Convert urls for consistency between Browser SDK and Android/iOS SDK
+ if (configuration.configurationMap.containsKey('authServiceEndpoint')) {
+ final auth =
+ configuration.configurationMap['authServiceEndpoint'] as String;
+ final jsAuth =
+ auth.endsWith('/v2') ? auth.substring(0, auth.length - 3) : auth;
+ urls.auth = jsAuth.toJS;
+ }
+ if (configuration.configurationMap
+ .containsKey('streamingServiceEndpoint')) {
+ final streaming = configuration
+ .configurationMap['streamingServiceEndpoint'] as String;
+ final jsStreaming = streaming.endsWith('/sse')
+ ? streaming.substring(0, streaming.length - 4)
+ : streaming;
+ urls.streaming = jsStreaming.toJS;
+ }
+ if (configuration.configurationMap
+ .containsKey('telemetryServiceEndpoint')) {
+ final telemetry = configuration
+ .configurationMap['telemetryServiceEndpoint'] as String;
+ final jsTelemetry = telemetry.endsWith('/v1')
+ ? telemetry.substring(0, telemetry.length - 3)
+ : telemetry;
+ urls.telemetry = jsTelemetry.toJS;
+ }
+ config.urls = urls;
+
+ final sync = JSObject() as JS_ConfigurationSync;
+ if (configuration.configurationMap['impressionsMode'] != null) {
+ sync.impressionsMode =
+ (configuration.configurationMap['impressionsMode'] as String)
+ .toUpperCase()
+ .toJS;
+ }
+
+ if (configuration.configurationMap['syncEnabled'] != null) {
+ sync.enabled =
+ (configuration.configurationMap['syncEnabled'] as bool).toJS;
+ }
+
+ if (configuration.configurationMap['syncConfig'] != null) {
+ final syncConfig = configuration.configurationMap['syncConfig']
+ as Map>;
+ final List