Repository navigation
chore!: rename platform enable/disable to optIn/optOut - #645
Merged
turnipdabeets merged 3 commits intoOct 7, 2026
Merged
Conversation
Contributor
posthog-flutter Compliance ReportDate: 2026-10-07 18:26:48 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
|
dustinbyrne
approved these changes
Oct 7, 2026
dustinbyrne
left a comment
Contributor
There was a problem hiding this comment.
The platform rename is consistent across the interface, implementations, and wrapper, with transport and lifecycle behavior preserved. Approving with one non-blocking changeset wording correction below. The Apple dependency failure is also present on the base stack.
AI-assisted review.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
turnipdabeets
added a commit
that referenced
this pull request
Oct 7, 2026
* chore!: rename platform enable/disable to optIn/optOut PosthogFlutterPlatformInterface.enable()/disable() become optIn()/optOut() to match the public Posthog API renamed in #636/#638. The method-channel names sent to native stay 'enable'/'disable'. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(changeset): cover direct platform callers in the opt-in/out rename Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
5 tasks done
turnipdabeets
added a commit
that referenced
this pull request
Oct 8, 2026
* chore!: rename platform enable/disable to optIn/optOut PosthogFlutterPlatformInterface.enable()/disable() become optIn()/optOut() to match the public Posthog API renamed in #636/#638. The method-channel names sent to native stay 'enable'/'disable'. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(changeset): cover direct platform callers in the opt-in/out rename Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
Finishes the
enable()/disable()→optIn()/optOut()rename from #636/#638 at the platform layer. The publicPosthog()API already usesoptIn()/optOut(), butPosthogFlutterPlatformInterface(and its IO/web implementations) still exposedenable()/disable(). Both classes are in the public API snapshot, so this is a hard rename for v6 with no deprecation shims.Breaking for code that calls these methods directly on
PosthogFlutterPlatformInterface,PosthogFlutterIOorPosthogFlutterWeb, and for custom implementations and test fakes/mocks that override them; app code callingPosthog().optIn()/optOut()is unaffected.Method-channel names are unchanged.
PosthogFlutterIOstill invokes'enable'/'disable'on the method channel, andPosthogFlutterWebstill dispatchesMethodCall('enable'/'disable')to the web handler. Renaming the wire strings would mean touching the Kotlin and Swift handlers and the web handler for no user-visible benefit, so this PR stays Dart-API-only.Stacked on #637.
💚 How did you test it?
flutter analyze: no issuesflutter test: all 781 tests passdart format --set-exit-if-changed: cleanapi/posthog_flutter.api.jsonwithscripts/check-api-dart.sh --update📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code renamed the methods, updated the test fake, regenerated the API snapshot, and added a major changeset. The decision to leave the native/web channel method strings alone was made to keep the change Dart-only.
🤖 Generated with Claude Code