configdirector_flutter_client_sdk 1.5.0
configdirector_flutter_client_sdk: ^1.5.0 copied to clipboard
Flutter client SDK for ConfigDirector. ConfigDirector is a remote configuration and feature flag service.
Changelog #
The format follows Keep a Changelog, and this project follows Semantic Versioning.
[Unreleased] #
1.5.0 - 2026-10-01 #
Added #
package:configdirector_flutter_client_sdk/testing.dart, withcreateTestClientandTestClient: the SDK's real client connected to an in-memory server the test controls.setValue,removeValue, andreplaceValueschange the served values and reachwatchstreams,onConfigsUpdated, and reads;holdInitialization,completeInitialization,failInitialization, and theirContextUpdatecounterparts control readiness;contextUpdatesrecords the context of everyinitializeandupdateContext. No network connection is opened, no telemetry is sent, and no platform channel is used.
Changed #
isInitializingnow means the client is trying to get its very first config state. It becomestruewheninitializeis called on a client that has never received config state, staystruethrough timeouts and retries, and becomesfalsewhen the first config state arrives, when an unrecoverable connection error stops the retries, or ondispose. Before, it turnedfalseas soon asinitializereturned, including after a timeout while the client kept retrying, and a laterinitializeon a client that already had config state set it again.
Fixed #
initializereturns as soon as the server rejects the connection with an unrecoverable status (for example an invalid SDK key) instead of waiting out the connection timeout, no longer logs that the client will keep retrying, and no longer applies the context or emitsContextUpdatedEventfor a connection that was never established. The client stays not ready and every read serves the in-code default value, as before.
1.4.0 - 2026-09-29 #
Added #
ConfigsUpdatedEvent.removedKeys: the keys a full update no longer carried, so a listener can tell a config that was removed from one that was updated.keysstill lists only the keys the update carried. It is an optional named constructor parameter defaulting to an empty list, so existingConfigsUpdatedEvent(keys)calls compile.
Changed #
ConnectionOptions.pollingIntervaldefaults to 60 seconds and has a minimum of 30 seconds. In polling mode, a value below the minimum (including zero or a negative duration) is raised to 30 seconds and a single warning is logged when the client is created, instead of the client throwing aConfigDirectorValidationException. The options object keeps the configured value.
1.3.1 - 2026-09-26 #
Fixed #
- The telemetry report now includes the app name and version, so that evaluations can be shown in the activity graphs per app.
1.3.0 - 2026-09-25 #
Changed #
- A boolean, integer, or float config requested as a
Stringnow evaluates to the default value with thetypeMismatchreason, instead of the value's text withfoundMatch. Reading a JSON config as aStringstill returns its raw document.
1.2.0 - 2026-09-22 #
Added #
evaluate, returning theConfigEvaluationthatgetValuewould have emitted: the value, whether it is the default, the reason, and the value id. Use it where the reason matters at the point of the read;getValueis enough everywhere else.SdkIdentityandcreateWrapperClient, through which a wrapper maintained by ConfigDirector reports its own name and version to the server in place of the SDK's. The set of identities is closed: there is a factory per wrapper, and no way to build one from an arbitrary name. Both live in the separatewrapper.dartlibrary, since an application has no use for them. This is groundwork for the OpenFeature provider.
1.1.0 - 2026-09-17 #
Fixed #
- HTTP 429 response codes from the SDK server are no longer treated as a fatal error. These need to be handled as transient errors so the client continues to retry and reconnects once the rate limit is cleared.
1.0.0 - 2026-09-04 #
Changed #
- Breaking:
ConfigDirectorConnectionErrorandConfigDirectorValidationErrorare renamed toConfigDirectorConnectionExceptionandConfigDirectorValidationException. Both implementException, and Dart reserves theErrorsuffix for programming errors that are not meant to be caught.
Removed #
- Breaking:
ConnectionMode.oneTime. The client connects by streaming or polling only. To fetch config state once per context, poll with a longpollingIntervaland callupdateContextwhen it should be re-fetched.
Fixed #
- A streaming update whose fields have unexpected types is logged and skipped instead of
surfacing as an uncaught
TypeError. The same response from the polling endpoint is reported as aConfigDirectorConnectionError. - A server-sent
retry:field too large for an integer is ignored instead of throwing. - When
updateContextis called again before the previous update has connected, the newer context wins:context,onContextUpdated, and telemetry attribution no longer end up on the older one. Resuming the network after a pause that interruptedinitializereconnects with the context that was passed toinitialize. - In polling mode, a context update issued while the previous fetch was still in flight no longer leaves a second poll running with the old context, and pausing the network during the initial fetch no longer starts polling once that fetch completes.
- Flushing telemetry twice in quick succession, which happens every time the app is backgrounded, no longer leaves an extra flush timer running for the life of the client.
- Pausing the network while the streaming connection was still being established no longer leaves that connection open in the background once the server answers.
- The time spent reading the app name and version from the platform no longer counts against
the initialization timeout, so a slow platform channel on cold start no longer makes
initializegive up on the first config set early. isInitializingreturns tofalseonceinitializecompletes, including when the connection failed or timed out. It used to staytrueforever in those cases.- A
watchstream of a JSON config no longer re-emits the same document on every update; only a document whose content changed is emitted. - In polling mode, a transient failure on the first fetch (a timeout, a server error, a malformed
response) no longer leaves
contextand telemetry on the previous context while polling continues with the new one. The failure is logged and the next poll retries. An unrecoverable failure, such as an invalid SDK key, is logged as well rather than thrown. - In streaming mode, an unrecoverable failure to connect, such as an invalid SDK key, is logged rather than thrown from the transport, so no transport can throw into the application.
ConfigDirectorContextequality compares nested traits by value rather than by identity.- The client rejects a
timeoutthat is not positive, and apollingIntervalthat is not positive in polling mode, with aConfigDirectorValidationExceptionat construction. A zero polling interval used to turn polling into a one-time fetch silently. - A
watchstream now falls back to its default when a full config update no longer carries its config. It used to keep yielding the last value it had seen whilegetValuealready returned the default.
0.10.0 - 2026-08-13 #
Changed #
- Telemetry reports carry the SDK name and version, which the ConfigDirector dashboard uses to break down evaluations by SDK.
- The example app is a single file, so it reads in full on pub.dev.
0.1.0 - 2026-08-02 #
Added #
ConfigDirectorClient, evaluatingbool,int,double,Stringand JSON configs against aConfigDirectorContext, with typed defaults.- Streaming and polling transports, selectable through
ConnectionOptions. watchstreams and client events (ClientReadyEvent,ConfigsUpdatedEvent,ContextUpdatedEvent,ConfigEvaluatedEvent) for reacting to config and context changes.- Telemetry reporting of evaluated configs, off the main isolate on native platforms.
- Support for both native and web targets.