diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 60ed610b..050b76ad 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"packages/common":"1.8.1","packages/common_client":"1.14.0","packages/event_source_client":"3.0.0","packages/flutter_client_sdk":"4.19.0"} +{"packages/common":"1.8.1","packages/common_client":"1.14.0","packages/event_source_client":"3.0.0","packages/flutter_client_sdk":"4.20.0"} diff --git a/packages/flutter_client_sdk/CHANGELOG.md b/packages/flutter_client_sdk/CHANGELOG.md index a9fed557..dd2d4520 100644 --- a/packages/flutter_client_sdk/CHANGELOG.md +++ b/packages/flutter_client_sdk/CHANGELOG.md @@ -2,6 +2,55 @@ All notable changes to the LaunchDarkly Flutter client-side SDK will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). +## [4.20.0](https://github.com/launchdarkly/flutter-client-sdk/compare/4.19.0...4.20.0) (2026-06-29) + + +### Features + +* Add experimental support for data-saving mode (FDv2). ([#314](https://github.com/launchdarkly/flutter-client-sdk/issues/314)) ([c2f9216](https://github.com/launchdarkly/flutter-client-sdk/commit/c2f9216b3e7dc30f1b0f00c18b680aa32d41a91d)) +* Update launchdarkly_common_client to version 1.14.0 ([#320](https://github.com/launchdarkly/flutter-client-sdk/issues/320)) ([2144c78](https://github.com/launchdarkly/flutter-client-sdk/commit/2144c785f5050cbabd421478219f4b5cd7a935a1)) +* Add Early Access support for the FDv2 data system (data saving mode). + +The Flutter SDK now supports the **FDv2 data system** in Early Access. Opt in by providing a `DataSystemConfig` when you build your `LDConfig`: + +```dart +final config = LDConfig( + '', + AutoEnvAttributes.enabled, + // Providing a data system configuration (even an empty one) opts the + // SDK into the FDv2 data acquisition protocol. + dataSystem: const DataSystemConfig(), +); +``` + +Applications that do not provide a `dataSystem` continue to use the existing (FDv1) data sources, so default behavior is unchanged. + +By default the SDK streams in the foreground (with polling fallback) and switches to a reduced-rate background mode when the app is backgrounded, following the application lifecycle and network availability automatically. You can turn that automatic switching off through `ApplicationEvents`. + +Control the connection mode at runtime with `setConnectionMode`, which takes a `ConnectionModeId` (`streaming`, `polling`, `background`, or `offline`). Setting a mode is a sticky override that suppresses automatic switching; pass no argument to clear it and resume automatic resolution: + +```dart +// Force a specific mode (sticky; suppresses automatic switching). +client.setConnectionMode(ConnectionModeId.polling); + +// Clear the override and resume automatic mode resolution. +client.setConnectionMode(); +``` + +To start in a specific mode, set `DataSystemConfig.initialConnectionMode` — equivalent to calling `setConnectionMode` with that mode immediately after the client is created: + +```dart +final config = LDConfig( + '', + AutoEnvAttributes.enabled, + dataSystem: const DataSystemConfig( + initialConnectionMode: ConnectionModeId.polling, + ), +); +``` + +> This feature is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is in early access. If you want access to this feature, please join the EAP. See https://launchdarkly.com/docs/sdk/features/data-saving-mode. + ## [4.19.0](https://github.com/launchdarkly/flutter-client-sdk/compare/4.18.1...4.19.0) (2026-06-10) diff --git a/packages/flutter_client_sdk/example/pubspec.yaml b/packages/flutter_client_sdk/example/pubspec.yaml index 8eba6075..2e7c66e1 100644 --- a/packages/flutter_client_sdk/example/pubspec.yaml +++ b/packages/flutter_client_sdk/example/pubspec.yaml @@ -33,7 +33,7 @@ dependencies: # This defaults to a published package. Using `flutter pub get` will get the package from pub.dev # If you run `melos bs` in the root of the repository, then it will be linked to the local version # instead. - launchdarkly_flutter_client_sdk: 4.19.0 # x-release-please-version + launchdarkly_flutter_client_sdk: 4.20.0 # x-release-please-version # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. diff --git a/packages/flutter_client_sdk/example_fdv2/pubspec.yaml b/packages/flutter_client_sdk/example_fdv2/pubspec.yaml index 648750b2..74befc59 100644 --- a/packages/flutter_client_sdk/example_fdv2/pubspec.yaml +++ b/packages/flutter_client_sdk/example_fdv2/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: # This defaults to a published package. Using `flutter pub get` will get the # package from pub.dev. If you run `melos bs` in the root of the repository, # then it will be linked to the local version instead. - launchdarkly_flutter_client_sdk: 4.19.0 # x-release-please-version + launchdarkly_flutter_client_sdk: 4.20.0 # x-release-please-version cupertino_icons: ^1.0.6 dev_dependencies: diff --git a/packages/flutter_client_sdk/lib/src/ld_client.dart b/packages/flutter_client_sdk/lib/src/ld_client.dart index 6886abc8..9b2c590c 100644 --- a/packages/flutter_client_sdk/lib/src/ld_client.dart +++ b/packages/flutter_client_sdk/lib/src/ld_client.dart @@ -9,7 +9,7 @@ import 'platform_env_reporter.dart'; import 'plugin.dart'; const sdkName = 'FlutterClientSdk'; -const sdkVersion = '4.19.0'; // x-release-please-version +const sdkVersion = '4.20.0'; // x-release-please-version /// The main interface for the LaunchDarkly Flutter SDK. /// diff --git a/packages/flutter_client_sdk/pubspec.yaml b/packages/flutter_client_sdk/pubspec.yaml index 5fe31fcb..550a84ff 100644 --- a/packages/flutter_client_sdk/pubspec.yaml +++ b/packages/flutter_client_sdk/pubspec.yaml @@ -1,6 +1,6 @@ name: launchdarkly_flutter_client_sdk description: Official Flutter client-side SDK for LaunchDarkly. Get started using LaunchDarkly today! -version: 4.19.0 +version: 4.20.0 homepage: https://github.com/launchdarkly/flutter-client-sdk repository: https://github.com/launchdarkly/flutter-client-sdk/tree/main/packages/flutter_client_sdk