NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #640 most downloaded on pub.dev
Flutter implementation of PostHog client for iOS, Android, macOS, Windows, Linux and Web
Latest stable
5.60.1
Last release 13 days ago
09 Nov 2026
Ships on a steady schedule
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
179 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
3239e4e: Keep Android surveys working when setup() runs more than once in a process, for example after a Flutter hot restart. The plugin now reuses th
setup() runs more than once in a process, for example after a Flutter hot restart. The plugin now reuses the survey delegate that the native SDK holds, and points it at the engine that is attached, so a survey that appears captures survey shown, survey sent and survey dismissed again, keeps the answer, and counts as seen. A recurring survey no longer comes back on every launch. Release the delegate's channel when its engine detaches, and discard the delegate when the SDK closes. Preserve unfinished answers across engine detach/reattach and Flutter hot restart without recording a dismissal.96e5209: Add PostHogConfig.featureFlagRequestMaxRetries to set how many times a failed /flags request is retried on iOS, Android, macOS, Windows, and
PostHogConfig.featureFlagRequestMaxRetries to set how many times a failed /flags request is retried on iOS, Android, macOS, Windows, and LinuxYour coding agent can read these notes before it upgrades. Set up the MCP server →
9214ace: Breaking: Change PostHogSessionReplayConfig.screenshotScale from double to double? with a null default, so native screens recorded with captu
PostHogSessionReplayConfig.screenshotScale from double to double? with a null default, so native screens recorded with captureNativeScreens on Android pick up posthog-android's one-pixel-per-dp default instead of physical resolution. Flutter screens still capture at one pixel per logical pixel. Set screenshotScale = 1.0 to keep native screens at physical resolution. Code that reads the value into a double needs a null check.2dd8d8d: Raise the Android SDK minimum to 3.75.0 to support Firebase Installation ID (FID) push registration when firebase_messaging_installation_id_e
firebase_messaging_installation_id_enabled is enabled. With firebase_messaging 17+, forward onRegistered to the existing registerPushNotificationToken method; explicit Android registrations refresh the subscription even when the FID is unchanged. iOS continues to use APNs by default.5b85326: Fix session replay after optIn() continuing the session that was active while opted out, and raise the minimum PostHog iOS SDK to 3.92.3.
optIn() continuing the session that was active while opted out, and raise the minimum PostHog iOS SDK to 3.92.3.ce069ea: Keep events in call order on every platform except Windows and Linux while an async beforeSend runs. A reset(), identify(), alias(), register
beforeSend runs. A reset(), identify(), alias(), register(), group(), optIn() or optOut() made after an un-awaited capture(), screen() or captureException() now applies after that event, so the event goes out with the user, super properties, groups and consent it was captured under, as in the native SDKs. While a beforeSend callback runs, later PostHog calls (getters included) wait for it; one that runs longer than 10 seconds stops holding them back, and its event is still sent when it finishes, with the user, super properties, groups and consent current by then.50c2c3e: Mask Android session replay frames while the app window has FLAG_SECURE set, instead of recording the secure screen.
FLAG_SECURE set, instead of recording the secure screen.cabe336: Resolve obfuscated Flutter mobile stack frames with uploaded debug symbols.
isolate.addPostHogErrorListener() and isolate.removePostHogErrorListener() to capture uncaught background isolate errors and clean up their listeners, and clarify that captureIsolateErrors only monitors the setup isolate.dda207d: Upgrade the Android SDK to 3.72.9, which pulls in OkHttp 4.12.1 to block the compromised eMudhra intermediate certificates.
0db911a: Add getAllFeatureFlags() to read every loaded feature flag result without capturing $feature_flag_called
getAllFeatureFlags() to read every loaded feature flag result without capturing $feature_flag_calledcaptureFeatureView() and captureFeatureInteraction() to capture $feature_view and $feature_interaction events for a feature flagPostHogConfig.evaluationContexts to limit which feature flags are evaluated on iOS, Android, macOS, Windows, and LinuxsendFeatureFlagEvent parameter to getFeatureFlag() and isFeatureEnabled() to override PostHogConfig.sendFeatureFlagEvent per call94ca664: Omit numeric NaN and infinities from Windows/Linux event object properties and send them as null in arrays instead of strings. Preserve array
7fa8179: Stop PosthogObserver from registering itself with WidgetsBinding and never unregistering, which leaked one observer per navigator, such as ea
PosthogObserver from registering itself with WidgetsBinding and never unregistering, which leaked one observer per navigator, such as each nested auto_route router.27eada6: Apply the survey appearance fontFamily to the built-in survey UI. The font must be bundled with the app; a missing, blank, inherit, or unbund
fontFamily to the built-in survey UI. The font must be bundled with the app; a missing, blank, inherit, or unbundled family uses the default font.3b55de1: Add experimental Windows and Linux support, enabled by default and set up with the same Posthog().setup(config) as the other platforms. Exist
Posthog().setup(config) as the other platforms. Existing apps will start tracking on Windows and Linux after upgrading. Set config.enableWindowsAndLinux = false before setup to disable the SDK on these platforms without affecting other platforms. Event and screen capture, exception capture (including autocapture of Flutter and Dart errors, and exception steps), identify, alias, groups, super properties, feature flags, bootstrap, opt-out and application lifecycle events work on both. App metadata comes from the executable's ProductName and ProductVersion on Windows and the bundled version.json on Linux. State is stored under posthog/<project token> in the application support directory returned by the official Windows/Linux path_provider implementations. If the directory is unavailable, state stays in memory and is lost when the SDK closes or the app exits. Events include $timezone when the SDK can determine a local IANA time zone; on Windows, this uses the system ICU data on a best-effort basis. Session replay, surveys, logs, push notifications and native crash capture are not supported on Windows and Linux.53370a9: Wait surveyPopupDelaySeconds before showing a survey. A missing, zero, or negative delay still shows it immediately.
surveyPopupDelaySeconds before showing a survey. A missing, zero, or negative delay still shows it immediately.0703fbb: Send $flutter_version only on the Application Installed and Application Updated events on iOS, macOS and Android instead of on every event, a
$flutter_version only on the Application Installed and Application Updated events on iOS, macOS and Android instead of on every event, and stop sending it on webe8398cc: Add $flutter_version (for example 3.32.0) to events captured through capture, screen and captureException, including the event beforeSend rec
$flutter_version (for example 3.32.0) to events captured through capture, screen and captureException, including the event beforeSend receives. Requires apps built with Flutter 3.32 or later; it's omitted on older Flutter versions and on events the native iOS/Android SDKs or posthog-js capture on their own, such as lifecycle events.6ec313e: Stop Flutter session replay when optOut() opts the user out, and start a new recording on optIn() if a recording was actually stopped.
optOut() opts the user out, and start a new recording on optIn() if a recording was actually stopped.1d90e6e: - Add Posthog().optIn() and Posthog().optOut(), and deprecate enable() and disable()
Posthog().optIn() and Posthog().optOut(), and deprecate enable() and disable()
PostHogConfig.sendFeatureFlagEvent, and deprecate sendFeatureFlagEvents033c2ce: Stop exporting PostHogWidgetState and PostHogMaskWidgetState, which are internal to PostHogWidget and PostHogMaskWidget and have no usable pu
PostHogWidgetState and PostHogMaskWidgetState, which are internal to PostHogWidget and PostHogMaskWidget and have no usable public memberse0a5f8f: Deprecate PostHogDataMode.cellular, which always behaved like PostHogDataMode.any; use any instead.
PostHogDataMode.cellular, which always behaved like PostHogDataMode.any; use any instead.b064e83: Show a survey that arrives before PosthogObserver has a context once the next navigation happens, instead of dropping it and blocking later s
PosthogObserver has a context once the next navigation happens, instead of dropping it and blocking later surveys.cadba6d: Reapply Dart automatic error-capture hooks when setup is called again with changed flags.
890e432: Parse survey question id from native payloads instead of using the question type.
id from native payloads instead of using the question type.56293ae: Preserve chained error handlers after teardown and prevent duplicate exception captures when error tracking restarts.
66c9257: Stop calling the deprecated getFeatureFlagPayload of the PostHog iOS SDK on iOS and macOS, which is removed in its next major version.
getFeatureFlagPayload of the PostHog iOS SDK on iOS and macOS, which is removed in its next major version.a5ce763: Correct in-app error tracking configuration examples to use bare Dart package names.
afc14aa: Let optional open-text and rating survey questions be skipped, and use the question's button label.
99075ad: Close a completed survey immediately when its appearance turns the thank-you screen off.
9b6fb05: Record a skipped optional multiple-choice survey question as no answer instead of an empty list.
$screen_name.4d5268d: Retry a session replay snapshot on iOS when it fails to encode, instead of dropping it.
2f164dd: Retry a session replay snapshot when the native channel call fails instead of marking it delivered.
06a40c2: Keep legacy $set and $set_once person properties when the nested map comes from JSON.
$set and $set_once person properties when the nested map comes from JSON.a71971e: Run beforeSend for capture, screen, and captureException on Flutter web.
beforeSend for capture, screen, and captureException on Flutter web.9803604: Attach $app_version and $app_build to web events, read from the FLUTTER_BUILD_NAME / FLUTTER_BUILD_NUMBER compile-time constants (Flutter 3.4
$app_version and $app_build to web events, read from the FLUTTER_BUILD_NAME / FLUTTER_BUILD_NUMBER compile-time constants (Flutter 3.47+), so web events carry the running app's version like iOS and Android do.fbe5397: Add the compression config (PostHogCompression.gzip / none) so an app can send request bodies uncompressed, e.g. when a managed network or wo
compression config (PostHogCompression.gzip / none) so an app can send request bodies uncompressed, e.g. when a managed network or work profile alters the compressed body in transit.b155321: Support survey partial responses and persistent resume on iOS and Android. Submitted answers and the next question are restored after SDK rec
b155321: Support survey partial responses and persistent resume on iOS and Android. Submitted answers and the next question are restored after SDK recreation, while completing or dismissing a survey, or calling reset, clears saved progress. Requires PostHog iOS >= 3.80.0 and Android >= 3.70.0.
Fix skipping optional answers on Android, which could previously fail when the response was null.
36fcf5a: Add $recording_status and $sdk_debug_* session replay debug properties to captured events via the native SDKs, forward throttleDelay to the n
$recording_status and $sdk_debug_* session replay debug properties to captured events via the native SDKs, forward throttleDelay to the native replay config, and raise the native floors to posthog-ios 3.80.0 and posthog-android 3.69.039bd554: Add sessionReplayConfig.textMaskPolicy to mask text at glyph precision instead of all-or-nothing. A policy is a PostHogTextMask Function(Stri
sessionReplayConfig.textMaskPolicy to mask text at glyph precision instead of all-or-nothing. A policy is a PostHogTextMask Function(String text, Widget widget) that decides per text node whether to mask all of it, none of it, only some character ranges, or everything except some ranges — using the node's rendered string, the widget that produced it, or both — so an app can hide amounts and card numbers while the labels around them stay readable. Ships with PostHogTextMaskPolicies.digits(), .redact(RegExp) and .reveal(RegExp). Applies to Text, RichText, and non-sensitive text inputs; sensitive inputs, PostHogMaskWidget, and PostHogUnmaskWidget keep precedence, and the policy fails closed by masking the whole node when it throws or returns a range outside the text.7f660c8: Support automatic submission for survey ratings and single-choice questions without an open choice when skipSubmitButton is enabled. Requires
3cfa388: Document that on iOS maskAllPlatformViews = false and PostHogPlatformViewPrivacy.capture only reveal WKWebView-backed UiKitViews (maps and ot
maskAllPlatformViews = false and PostHogPlatformViewPrivacy.capture only reveal WKWebView-backed UiKitViews (maps and other native views stay masked), and log in debug builds when the native side declines a platform view capture and the view is masked instead (#593).8a27e44: Render multiple-choice option labels in the survey text color so they stay readable on dark backgrounds.
2e343e6: Respect configured open-text survey placeholders and leave unset placeholders empty.
5f92452: Honor shuffleOptions in Flutter surveys while keeping Other last and choice order stable while answering.
0552616: Add experimental Android session replay screenshot controls: screenshotScale and screenshotCompressionQuality for Flutter and native captures
screenshotScale and screenshotCompressionQuality for Flutter and native captures, and screenshotColorMode for native captures. Scale Flutter captures, masks, and embedded native views together while preserving logical playback dimensions and JPEG encoding.77c4fe0: Fix a manual capturePushNotificationOpened() call double-counting a PostHog notification tap the SDK already captured, using the dedupe added
capturePushNotificationOpened() call double-counting a PostHog notification tap the SDK already captured, using the dedupe added in posthog-android 3.65.0 and posthog-ios 3.75.0. Update the native SDKs to posthog-android 3.65.2 and posthog-ios 3.75.2.aa1dea6: Add PostHogUnmaskWidget to reveal known-safe Flutter text and images while keeping global masking enabled. Unmasking overrides explicit masks
PostHogUnmaskWidget to reveal known-safe Flutter text and images while keeping global masking enabled. Unmasking overrides explicit masks in either nesting order, but sensitive inputs stay masked. Protection covers obscured fields, sensitive keyboard types, and standard autofill hints for personal, contact, address, authentication, and payment data across Material, Cupertino, and direct EditableText inputs. Nested unmask regions are subtracted from enclosing masks only when their transforms and clips allow a safe rectangular exclusion. On Flutter web, mounting either wrapper enables canvas masking; declare canvasCapture.maskRegionsFn: () => null in posthog.init's session_recording configuration to protect frames before the first mount. Native platform views and captured native screens are unaffected.660270b: Fix $push_notification_opened being lost on Android when a notification tap reaches the app before Posthog().setup() runs.
$push_notification_opened being lost on Android when a notification tap reaches the app before Posthog().setup() runs.66e738c: Add sessionReplayConfig.maskCustomPaint, defaulting to false, to opt into masking the full bounds of custom-painted widgets independently of
66e738c: Add sessionReplayConfig.maskCustomPaint, defaulting to false, to opt into masking the full bounds of custom-painted widgets independently of text and image masking.
Flutter's maskAllTexts and maskAllImages inspect the widget tree, not arbitrary canvas drawing. Even with those flags enabled, custom-painted text and images require maskCustomPaint or an explicit PostHogMaskWidget. The new option stays opt-in because it can also mask non-sensitive Material UI, including tab bars, checkboxes, switches, and progress indicators.
Framework scrollbar-only painters are excluded so desktop scrollable viewports remain visible, while their children are still checked for masks. With maskCustomPaint enabled, frames containing painters with unknown bounds, including zero-sized painters, are skipped rather than sent unmasked.
696ab7f: Warn when PostHogWidget mounts before Posthog().setup() on mobile, explaining that session replay requires setup before mounting or remountin
dddc307: Add sessionReplayConfig.captureTouches to disable replay touch coordinates during SDK initialization on Android and iOS while keeping masked
sessionReplayConfig.captureTouches to disable replay touch coordinates during SDK initialization on Android and iOS while keeping masked screenshots. This protects keypad entry whose values can be reconstructed from tap positions. Requires posthog-android 3.64.0 and posthog-ios 3.74.0. Runtime changes are not supported.3ce8592: Fix session replay masking only the first line of an auto-growing text field (maxLines: null or expands: true); the mask now covers the field
maxLines: null or expands: true); the mask now covers the field's full height.00337ab: Capture $push_notification_opened on Android for every notification tap, both on a cold launch and while the app is already running. Remove a
$push_notification_opened on Android for every notification tap, both on a cold launch and while the app is already running. Remove any manual capturePushNotificationOpened call wired to FirebaseMessaging.onMessageOpenedApp or getInitialMessage() — that tap is now captured automatically and the manual call is not deduplicated against it. Requires posthog-android 3.62.0.$push_notification_opened not being captured on iOS when the app is cold-launched from a notification tap. Requires posthog-ios 3.72.0, and your app must set UNUserNotificationCenter.current().delegate — without one iOS reports the tap to nobody.com.posthog.posthog.CAPTURE_PUSH_NOTIFICATION_OPENED to also suppress the new iOS cold-start prewarm in apps that do not use com.posthog.posthog.AUTO_INIT.d7c51c2: Surveys can now display an optional intro screen before the first question, configured via the new displayIntroScreen, introScreenHeader, int
displayIntroScreen, introScreenHeader, introScreenDescription, introScreenDescriptionContentType, and introScreenButtonText appearance fields. The intro is rendered by the Dart survey UI as the leading mirror of the confirmation message: advancing past it records no response and sends no survey event, while closing the survey from the intro still sends the normal survey dismissed event. Requires posthog-ios >= 3.70.0 and posthog-android >= 3.59.0, which forward the new appearance fields over the bridge.e7445f4: Fix session replay painting a clipped map, WebView, or camera preview past its visible edge and over the widgets around it. A platform view's
0de477b: Add PostHogSessionReplayConfig.verifyScreenshotMaskAlignment for Android native screens captured with captureNativeScreens. Enabling it can p
PostHogSessionReplayConfig.verifyScreenshotMaskAlignment for Android native screens captured with captureNativeScreens. Enabling it can preserve screenshots and mask alignment during pixel-only redraws, including continuously animated content, but performs additional view hierarchy walks. It remains disabled by default.577c59e: Fix session replay started with startSessionRecording() capturing nothing on Android by requiring posthog-android 3.60.7 or newer.
startSessionRecording() capturing nothing on Android by requiring posthog-android 3.60.7 or newer.024d690: Add errorTrackingConfig.captureNativeCrashes to capture native C/C++ (NDK) crashes on Android. Requires Android 12 (API 31) and exception aut
errorTrackingConfig.captureNativeCrashes to capture native C/C++ (NDK) crashes on Android. Requires Android 12 (API 31) and exception autocapture enabled in the project's error tracking settings; crashes are captured on the next app launch and symbolicated against .so debug symbols uploaded with the PostHog Gradle plugin.reset(), or a close()/setup() pair — while that screen is up.f3ccdee: Drop events when a before-send callback throws.
3be4ded: Fix mobile session replay producing a blank recording after the session changes or the recording restarts — on idle or maximum-duration expir
reset(), close()/setup(), or startSessionRecording(resumeCurrent: false). The new session now sends its own meta event and is sampled even on a screen that never repaintsOne column per quarter.