Repository navigation
chore!: make getFeatureFlagResult follow config.sendFeatureFlagEvent by default - #662
Merged
turnipdabeets merged 1 commit intoOct 27, 2026
Conversation
Contributor
posthog-flutter Compliance ReportDate: 2026-10-26 18:44:18 UTC ✅ All Tests Passed!45/45 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
5 tasks done
turnipdabeets
force-pushed
the
chore/v6-posthog-ios-4
branch
from
October 26, 2026 18:35
c3150c0 to
713e973
Compare
…by default sendFeatureFlagEvent defaulted to true, so getFeatureFlagResult() captured $feature_flag_called even when PostHogConfig.sendFeatureFlagEvent was false, unlike getFeatureFlag(), isFeatureEnabled() and the native SDKs. It's now nullable, and null follows the config on every platform.
turnipdabeets
force-pushed
the
chore/v6-flag-result-send-event-config
branch
from
October 26, 2026 18:37
00c9684 to
8cc312b
Compare
marandaneto
approved these changes
Oct 27, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
getFeatureFlagResult()defaultedsendFeatureFlagEventtotrueand always passed it to the platform. So an app that setPostHogConfig.sendFeatureFlagEvent = falsestill captured$feature_flag_calledfrom everygetFeatureFlagResult()call, whilegetFeatureFlag()andisFeatureEnabled()followed the config. On iOS and Android,getFeatureFlagResult(key)follows the config too.sendFeatureFlagEventis nowbool?and defaults tonull, which follows the config on every platform:getFeatureFlagResult(_:)without the override whensendEventis missing.nulltogetFeatureFlagResult(key, sendFeatureFlagEvent), which falls back to the config.send_eventout, so posthog-js applies its own default.config.sendFeatureFlagEvent.Pass
trueorfalseto override per call, as before. This is breaking only for apps with the config off that relied ongetFeatureFlagResult()capturing the event anyway, so it targets 6.0 (#637) alongside #647's rename of this parameter.💚 How did you test it?
flutter analyze,flutter test(1259 pass),dart format --set-exit-if-changed,scripts/check-api-dart.sh(snapshot updated: threebool→bool?).sendFeatureFlagEvent = false,getFeatureFlagResult()captures nothing, andsendFeatureFlagEvent: truestill captures. It fails when the core falls back totrueinstead of the config.flutter build apk --debugandflutter build ios --simulator --debugfor the example app.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (Claude Opus 5.5) found this while comparing the feature flag APIs across the iOS, Android, Flutter and React Native majors, and made the change. It's one of the flag-parity changes for 6.0. Web keeps posthog-js's default, because the Flutter config isn't applied to the JS SDK there.
🤖 Generated with Claude Code