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
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,46 @@ All notable changes to the LaunchDarkly Flutter client-side SDK will be document
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
12
13
+
#### The Flutter SDK now supports the FDv2 data system in Early Access. Opt in by providing a DataSystemConfig when you build your LDConfig:
14
+
15
+
```dart
16
+
final config = LDConfig(
17
+
'<your-mobile-key>',
18
+
AutoEnvAttributes.enabled,
19
+
// Providing a data system configuration (even an empty one) opts the
20
+
// SDK into the FDv2 data acquisition protocol.
21
+
dataSystem: const DataSystemConfig(),
22
+
);
23
+
```
24
+
25
+
Applications that do not provide a dataSystem continue to use the existing (FDv1) data sources, so default behavior is unchanged.
26
+
27
+
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.
28
+
29
+
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:
30
+
31
+
```dart
32
+
// Force a specific mode (sticky; suppresses automatic switching).
// Clear the override and resume automatic mode resolution.
36
+
client.setConnectionMode();
37
+
```
38
+
39
+
To start in a specific mode, set DataSystemConfig.initialConnectionMode — equivalent to calling setConnectionMode with that mode immediately after the client is created:
40
+
41
+
```dart
42
+
final config = LDConfig(
43
+
'<your-mobile-key>',
44
+
AutoEnvAttributes.enabled,
45
+
dataSystem: const DataSystemConfig(
46
+
initialConnectionMode: ConnectionModeId.polling,
47
+
),
48
+
);
49
+
```
50
+
51
+
>▎ 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