From 5c2f2555e700e94bffd5ebac1668a9d783b1ff89 Mon Sep 17 00:00:00 2001 From: "confidence-agent[bot]" <253939730+confidence-agent[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 11:07:47 +0000 Subject: [PATCH] Document deprecation of list/array flag values Adds flag-specific deprecation notes for list/array flag schemas and values: - Doc comment on `Confidence.resolveKey` (the generic resolver; there is no distinct list-flag public API, so no `@Deprecated` annotation was applied and `getObject`/generic APIs are not deprecated). - Note in the README flag-resolution section. Runtime behavior is unchanged: existing list flags still resolve, native Android/iOS list mapping is kept, and lists in context/event data remain supported. No removal date or version bump. Checks: documentation-only change (comments + README). Flutter/Dart tooling was not available in the sandbox, so `flutter analyze`/`flutter test` were not run; the gap is noted here. --- README.md | 2 ++ lib/confidence_flutter_sdk.dart | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index a105193..8bbe838 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ await confidence.getString("[FLAG]", "Default")) The schema of the property plays a crucial role in resolving the property, if the schema type matches the asked type, the value will be returned otherwise we expect default value to be returned. +> **Deprecated:** list/array flag schemas and flag values are deprecated. Existing list flags continue to resolve (e.g. via `resolveKey>`), but new flags should avoid list properties. This applies only to flag values; lists in context and event data remain supported. + ### Send custom Events we can send custom events to the confidence sdk like following: diff --git a/lib/confidence_flutter_sdk.dart b/lib/confidence_flutter_sdk.dart index 44ca5e9..4cfe141 100644 --- a/lib/confidence_flutter_sdk.dart +++ b/lib/confidence_flutter_sdk.dart @@ -36,6 +36,11 @@ class ConfidenceFlutterSdk { return resolveKey(key) ?? defaultValue; } + /// Resolves the flag value at the dot-separated [key] as [T]. + /// + /// Note: resolving list/array flag values (e.g. `T` = `List`) is + /// deprecated. It keeps working for existing flags, but new flags should + /// not use list schemas. Lists in context and event data are unaffected. T? resolveKey(String key) { List keys = key.split("."); Map flags = _flags;