Summary
The Flutter SDK does not support linkedFlagVariant for surveys. Since Flutter wraps the native iOS and Android SDKs, this depends on those SDKs implementing the feature first.
Current State
Flutter currently requires:
- iOS SDK: >= 3.38.0 (does not support linkedFlagVariant)
- Android SDK: >= 3.25.0 (does not support linkedFlagVariant)
The native SDKs only check if a linked feature flag is enabled (isFeatureEnabled), but do not support targeting users in a specific variant of that flag.
Expected Behavior
When a survey has conditions.linkedFlagVariant set (e.g., "variant-a"), the SDK should:
- Get the actual flag value:
flags[linkedFlagKey]
- Compare it to the variant:
flagValue === linkedFlagVariant || linkedFlagVariant === "any"
Dependencies
This feature requires implementation in the native SDKs first:
Once implemented, Flutter will need to bump its minimum native SDK dependency versions.
Reference Implementation
See posthog-react-native: packages/react-native/src/surveys/getActiveMatchingSurveys.ts lines 77-83
Tracking
This is tracked in the survey SDK feature parity issue: PostHog/posthog#45658
Summary
The Flutter SDK does not support
linkedFlagVariantfor surveys. Since Flutter wraps the native iOS and Android SDKs, this depends on those SDKs implementing the feature first.Current State
Flutter currently requires:
The native SDKs only check if a linked feature flag is enabled (
isFeatureEnabled), but do not support targeting users in a specific variant of that flag.Expected Behavior
When a survey has
conditions.linkedFlagVariantset (e.g., "variant-a"), the SDK should:flags[linkedFlagKey]flagValue === linkedFlagVariant || linkedFlagVariant === "any"Dependencies
This feature requires implementation in the native SDKs first:
Once implemented, Flutter will need to bump its minimum native SDK dependency versions.
Reference Implementation
See posthog-react-native:
packages/react-native/src/surveys/getActiveMatchingSurveys.tslines 77-83Tracking
This is tracked in the survey SDK feature parity issue: PostHog/posthog#45658