PostHog / PostHog/posthog-flutter

Support survey cancellation events

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Survey
Dominant language
Dart
Stars
97
Forks
85
Avg merge
1d 8h
Merged PRs (30d)
31

Description

🚨 IMPORTANT

This issue is likely user-facing in the main PostHog app, see surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list here.

Summary

The posthog-flutter SDK does not support cancellation events for surveys.

Current State

The browser SDK supports cancelEvents in survey conditions, which allows surveys to be dismissed when specific events occur. This feature is not available in posthog-flutter because the underlying native SDKs (posthog-ios and posthog-android) don't support it yet.

Expected Behavior

When a survey has conditions.cancelEvents.values configured with events, the SDK should:

  1. Listen for those events being captured
  2. Dismiss any active survey when a matching cancellation event is triggered

Dependencies

This feature requires implementation in the native SDKs first:

Reference Implementation

See posthog-js browser: packages/browser/src/extensions/surveys.ts
For mobile-specific patterns, see posthog-react-native: packages/react-native/src/surveys/getActiveMatchingSurveys.ts

Tracking

This is tracked in the survey SDK feature parity issue: https://github.com/PostHog/posthog/issues/45658

This issue was generated by Claude using the /survey-sdk-audit skill.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the surveyVersionRequirements.ts entry in the main PostHog app and review the native dependency issues posthog-ios#450 and posthog-android#393. Compare the reference implementations in packages/browser/src/extensions/surveys.ts and packages/react-native/src/surveys/getActiveMatchingSurveys.ts. Done means posthog-flutter supports conditions.cancelEvents.values and dismisses active surveys for matching captured events after native SDK support exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.