Skip to content

v4.20.0

Latest

Choose a tag to compare

@LaunchDarklyReleaseBot LaunchDarklyReleaseBot released this 29 Jun 17:49
Immutable release. Only release title and notes can be modified.
c297110

4.20.0 (2026-06-29)

Features

  • Add experimental support for data-saving mode (FDv2). (#314) (c2f9216)
  • Update launchdarkly_common_client to version 1.14.0 (#320) (2144c78)

The Flutter SDK now supports the FDv2 data system in Early Access. Opt in by providing a DataSystemConfig when you build your LDConfig:

final config = LDConfig(
  '<your-mobile-key>',
  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:

// 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:

final config = LDConfig(
  '<your-mobile-key>',
  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.


This PR was generated with Release Please. See documentation.