You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/flutter_client_sdk/CHANGELOG.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,47 @@ All notable changes to the LaunchDarkly Flutter client-side SDK will be document
9
9
10
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
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).
// 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.
0 commit comments