|
2 | 2 |
|
3 | 3 | 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 | 4 |
|
| 5 | +## [4.20.0](https://github.com/launchdarkly/flutter-client-sdk/compare/4.19.0...4.20.0) (2026-06-29) |
| 6 | + |
| 7 | + |
| 8 | +### Features |
| 9 | + |
| 10 | +* 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)) |
| 11 | +* 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)) |
| 12 | +* Add Early Access support for the FDv2 data system (data saving mode). |
| 13 | + |
| 14 | +The Flutter SDK now supports the **FDv2 data system** in Early Access. Opt in by providing a `DataSystemConfig` when you build your `LDConfig`: |
| 15 | + |
| 16 | +```dart |
| 17 | +final config = LDConfig( |
| 18 | + '<your-mobile-key>', |
| 19 | + AutoEnvAttributes.enabled, |
| 20 | + // Providing a data system configuration (even an empty one) opts the |
| 21 | + // SDK into the FDv2 data acquisition protocol. |
| 22 | + dataSystem: const DataSystemConfig(), |
| 23 | +); |
| 24 | +``` |
| 25 | + |
| 26 | +Applications that do not provide a `dataSystem` continue to use the existing (FDv1) data sources, so default behavior is unchanged. |
| 27 | + |
| 28 | +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`. |
| 29 | + |
| 30 | +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: |
| 31 | + |
| 32 | +```dart |
| 33 | +// Force a specific mode (sticky; suppresses automatic switching). |
| 34 | +client.setConnectionMode(ConnectionModeId.polling); |
| 35 | +
|
| 36 | +// Clear the override and resume automatic mode resolution. |
| 37 | +client.setConnectionMode(); |
| 38 | +``` |
| 39 | + |
| 40 | +To start in a specific mode, set `DataSystemConfig.initialConnectionMode` — equivalent to calling `setConnectionMode` with that mode immediately after the client is created: |
| 41 | + |
| 42 | +```dart |
| 43 | +final config = LDConfig( |
| 44 | + '<your-mobile-key>', |
| 45 | + AutoEnvAttributes.enabled, |
| 46 | + dataSystem: const DataSystemConfig( |
| 47 | + initialConnectionMode: ConnectionModeId.polling, |
| 48 | + ), |
| 49 | +); |
| 50 | +``` |
| 51 | + |
| 52 | +> 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. |
| 53 | +
|
5 | 54 | ## [4.19.0](https://github.com/launchdarkly/flutter-client-sdk/compare/4.18.1...4.19.0) (2026-06-10) |
6 | 55 |
|
7 | 56 |
|
|
0 commit comments