Repository navigation
docs(flutter): version 6 upgrade guide - #20924
turnipdabeets wants to merge 15 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Deploy preview
Push a fix or re-run the workflow to try again. Common culprits
|
|
Vale prose linter → found 5 errors, 88 warnings, 5 suggestions in your markdown Full report → Copy the linter results into an LLM to batch-fix issues. Linter being weird? Update the rules!
|
| Line | Severity | Message | Rule |
|---|---|---|---|
| 21:1 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 21:102 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 23:30 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 26:63 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 37:1 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 61:127 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 65:118 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 67:96 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 69:99 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 69:195 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 69:240 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 69:275 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 75:17 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 75:95 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 75:115 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 92:36 | warning | 'ETags' is a possible misspelling. | PostHogBase.Spelling |
| 92:151 | warning | Use 'PostHog' instead of 'posthog'. | Vale.Terms |
| 104:107 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 256:214 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 256:229 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 256:249 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 272:42 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 272:69 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
contents/docs/integrate/_snippets/install-flutter.mdx — 0 errors, 1 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 130:6 | warning | 'Dart setup (For manual step only)' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-flutter.mdx — 0 errors, 7 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 1:13 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 13:18 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 27:83 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 29:39 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 49:91 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 51:15 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 53:91 | warning | 'refetch' is a possible misspelling. | PostHogBase.Spelling |
contents/docs/libraries/flutter/index.mdx — 5 errors, 43 warnings, 5 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 6:18 | warning | Use 'GitHub' instead of 'github'. | Vale.Terms |
| 6:37 | warning | Use 'PostHog' instead of 'posthog'. | Vale.Terms |
| 90:72 | warning | 'cookieless' is a possible misspelling. | PostHogBase.Spelling |
| 198:49 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 200:66 | suggestion | Address the reader directly. Use 'you' instead of 'the User'. | PostHogDocs.DirectAddress |
| 200:131 | suggestion | Address the reader directly. Use 'you' instead of 'the User'. | PostHogDocs.DirectAddress |
| 214:69 | warning | Avoid trivializing words. 'simply' can sound dismissive to the reader. | PostHogDocs.Trivializers |
| 222:4 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 222:4 | warning | 'Feature flags' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 235:79 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 276:25 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 280:8 | warning | Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. | PostHogBase.ProductNames |
| 280:55 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 280:128 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 282:28 | warning | Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. | PostHogBase.ProductNames |
| 282:54 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 284:4 | warning | 'Error tracking' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 284:4 | warning | Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. | PostHogBase.ProductNames |
| 286:11 | warning | Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. | PostHogBase.ProductNames |
| 286:52 | warning | Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. | PostHogBase.ProductNames |
| 290:12 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 292:4 | warning | 'Session replay' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 292:4 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 294:13 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 296:12 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 296:65 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 296:127 | warning | Avoid trivializing words. 'all you need to do' can sound dismissive to the reader. | PostHogDocs.Trivializers |
| 301:111 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 301:276 | warning | Use 'PostHog' instead of 'posthog'. | Vale.Terms |
| 355:96 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 356:8 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 435:24 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 436:26 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 437:23 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 438:33 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 442:3 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 469:62 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 469:100 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 480:26 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 530:5 | warning | 'Move from CocoaPods to Swift Package Manager' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 532:18 | warning | 'podspec' is a possible misspelling. | PostHogBase.Spelling |
| 547:173 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 583:117 | warning | Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. | PostHogBase.ProductNames |
| 623:84 | warning | Capitalize 'Endpoints' for PostHog's product. Use 'endpoints' for the general industry concept. | PostHogBase.ProductNames |
| 630:1 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 630:9 | warning | Use the Oxford comma before 'and' or 'or' in a list of three or more items. | PostHogBase.OxfordComma |
| 630:17 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 630:26 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 630:51 | warning | Capitalize 'Endpoints' for PostHog's product. Use 'endpoints' for the general industry concept. | PostHogBase.ProductNames |
| 632:38 | warning | Capitalize 'Endpoints' for PostHog's product. Use 'endpoints' for the general industry concept. | PostHogBase.ProductNames |
| 663:230 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 724:13 | warning | 'reachability' is a possible misspelling. | PostHogBase.Spelling |
| 725:167 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
contents/docs/surveys/installation/flutter.mdx — 0 errors, 2 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 13:64 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 21:11 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
contents/tutorials/flutter-ab-tests.md — 0 errors, 1 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 334:18 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
contents/tutorials/flutter-analytics.md — 0 errors, 6 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 19:2 | warning | Capitalize 'Product Analytics' for PostHog's product. Use 'Product analytics' for the general industry concept. | PostHogBase.ProductNames |
| 322:138 | warning | Use 'PostHog' instead of 'Posthog'. | Vale.Terms |
| 407:23 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 448:18 | warning | Capitalize 'Product Analytics' for PostHog's product. Use 'Product analytics' for the general industry concept. | PostHogBase.ProductNames |
| 456:150 | warning | 'enabed' is a possible misspelling. | PostHogBase.Spelling |
| 470:18 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
contents/tutorials/flutter-feature-flags.md — 0 errors, 3 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 2:22 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 16:2 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 200:44 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
contents/tutorials/flutter-remote-config.md — 0 errors, 2 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 166:15 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 322:4 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. | PostHogBase.ProductNames |
Bundle reportTotal JS (gzip)10.38 MiB (+0.6 KiB / +0.0%) Eager graph (modules shipped in each entrypoint's initial chunks)
Largest modules in the
|
| Module | Size |
|---|---|
./src/data/mcp-tools.json |
1472.7 KiB |
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css |
839.4 KiB |
./src/components/Stickers/Stickers.tsx |
696.4 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/x-ray.mjs |
481.2 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/trenchcoat.mjs |
450.8 KiB |
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules |
395.1 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/im-the-driver.mjs |
385.8 KiB |
./src/hooks/useCustomers.tsx + 61 modules |
381.8 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/tourist.mjs |
364.6 KiB |
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
354.8 KiB |
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules |
351.4 KiB |
./src/components/ProductComparisonTable/index.tsx + 130 modules |
314.3 KiB |
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 126 modules |
287.2 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/doll-house.mjs |
284.1 KiB |
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js |
281.9 KiB |
Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).
|
This PR hasn't seen activity in two weeks! Should it be merged, closed, or further worked on? If you want to keep it open, please remove the |
|
Flutter 6 sends events from iOS, macOS, Android, Windows and Linux to capture v1. Could the upgrade guide say so in one section, list what a reverse proxy must forward (/i/v1/analytics/events, /i/v1/ai/events and the Authorization header), and link the posthog-ios and posthog-android 4.0 migration guides? |
|
One addition for the proxy section: the proxy also needs to pass every PostHog-* header through and accept request bodies up to 20 MB (nginx and ingress-nginx default to 1 MB). The server SDK guides use this checklist: https://github.com/PostHog/posthog-python/blob/235047e220c48e1a69ab7354564ceefe035c4b34/docs/migration-7.x-to-8.0.md#L44-L50 |
|
@eli-r-ph I added the capture v1 parts to the Flutter 6 upgrade guide (3284e0f): endpoints per platform (web stays on posthog-js), reverse proxy and self-hosted requirements, property precedence, per-event |
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 3284e0f: 5 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
…, native addBeforeSend, phx_ keys everywhere
|
@turnipdabeets thanks, the capture v1 parts read well. A few additions for the 6.0 guide:
|
Add Event options and Capturing AI events sections to the Flutter page, with the captureAi queue settings and their defaults. The version 6 upgrade guide now covers what changed and links to them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add onFeatureFlags, synchronous beforeSend, the Windows and Linux changes from 5.x and the proxy Authorization rule. Link the managed proxy page, list Windows and Linux as supported, and mark AI observability as supported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@eli-r-ph thanks, these are in now (00c3ba4, plus 0294168 for the AI queue defaults):
The guide's |
posthog-flutter keeps the call queue on iOS, macOS and Android, so the event isn't dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| In version 5, the SDK's own values won over the properties you registered or passed. In version 6, your value wins for that event. A registered `$session_id` now overrides the SDK's session ID, which can detach events from their session replay. | ||
|
|
||
| `beforeSend` runs after the merge, so it sees and can change every property and option the SDK adds. In version 5, on iOS, macOS and Android, it ran before the native SDK added its properties and saw only the properties you passed. |
There was a problem hiding this comment.
Can the guide ask users to review their beforeSend hooks for the new event shape? In 3.x (Flutter 5.x) the SDK marked person processing with the $process_person_profile property; now it's the process_person_profile option. A hook that returns a new event without copying its options turns person processing on for anonymous users, which overrides personProfiles.
There was a problem hiding this comment.
Fixed in bd2ef7e — added the beforeSend review note, with options: event.options to keep the option.
|
|
||
| - Forward `/i/v1/analytics/events` and `/i/v1/ai/events` to PostHog. | ||
| - Pass `Authorization` (the project token, sent as `Bearer <token>`), every `PostHog-*` header, `Content-Type`, `Content-Encoding` and `User-Agent` through unchanged. | ||
| - If your proxy strips other credentials, keep `Authorization` values that start with `Bearer phc_`. If your project token doesn't start with `phc_`, keep the exact value `Bearer <your project token>`. |
There was a problem hiding this comment.
Heads-up: we plan to widen the proxy rule in posthog.com #21792 (in review). Proxies would keep Authorization values that start with Bearer phc_, Bearer phs_ or Bearer phx_, plus the exact Bearer <key> of an older key without a prefix. Server SDKs send phs_ and phx_ keys through the same proxy for local evaluation and remote config, so a shared proxy that keeps only phc_ breaks them. Once #21792 merges, can we update this line to match the proxy guides? This SDK only sends the project token, so its own requests work either way.
|
|
||
| ### Feature flag callbacks | ||
|
|
||
| `PostHogConfig.onFeatureFlags` now receives a `PostHogFeatureFlagsLoaded` with the enabled flags, their values and whether loading failed, and `reloadFeatureFlags()` returns a `Future<PostHogFeatureFlagsLoaded>`. Callbacks written as `() { ... }` no longer compile: |
There was a problem hiding this comment.
Flutter 6 removes PostHogConfig.onFeatureFlags (posthog-flutter #695), so this example no longer compiles. Could it show Posthog().onFeatureFlags((loaded) { ... }) called before setup(), which also covers the first load?
There was a problem hiding this comment.
Fixed in b69e152 — shows Posthog().onFeatureFlags((loaded) { ... }) before setup(), and lists the removal.
|
|
||
| ### Events go to capture v1 | ||
|
|
||
| On iOS, macOS, Android, Windows and Linux, version 6 sends events to capture v1 instead of `/batch/`. iOS and macOS do this through `posthog-ios` 4.0, Android through `posthog-android` 4.0, and Windows and Linux in the SDK's Dart client. |
There was a problem hiding this comment.
Could this section link the posthog-ios and posthog-android 4.0 migration guides, and add two rules? A 402 (over your billing limit) drops the whole request. A $session_id or $window_id that isn't a string is removed before sending.
There was a problem hiding this comment.
Fixed in 1dc5fd1 — linked both native 4.0 guides and added the 402 and non-string session/window ID rules.
…reSend callbacks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changes
CocoaPods is removed in 6.0. Swift Package Manager becomes the only iOS and macOS option, with Flutter 3.41 or later, and add-to-app modules stay on 5.x. The install snippets, surveys page, tutorials and upgrade section all say so. This also depends on PostHog/posthog-flutter removing
posthog_flutter.podspec, which no branch has done yet.Migration file: the upgrade section links
posthog_flutter/MIGRATION.mdin posthog-flutter.Docs for posthog_flutter 6.0. Hold until 6.0 is released. It depends on PostHog/posthog-flutter#637, #649, #663, #673, #682 and #686 (#682 and #686 are still open, and the
beforeSendtext below is only true with them), which wait on the posthog-ios 4.0 release (PostHog/posthog-ios#873, PostHog/posthog-ios#938) and the posthog-android 4.0 release (PostHog/posthog-android#871, PostHog/posthog-android#881). Several of these pages describe 6.0 requirements (iOS 15, Xcode 26,PROJECT_TOKENonly), which are wrong for 5.x users until then./docs/libraries/flutter. It covers:/i/v1/analytics/eventsand AI events to/i/v1/ai/events. Web stays on posthog-js and its current endpoints. The section lists the routes, headers and body size that a reverse proxy must forward, and tells users that one proxy for all platforms needs both sets of routes.beforeSendsees all properties on every platform except web (Fixed link to "Spending money" section of the handbook. #682).PostHogConfig.onFeatureFlagsis removed in favor ofPosthog().onFeatureFlags((loaded) { ... })beforesetup(), andreloadFeatureFlags()returns aPostHogFeatureFlagsLoaded.beforeSend(Fix Superlist of Minor Issues #686).Retry-After, batch size, non-finite numbers, empty names and logs.optionsargument andcaptureAi, with the web limits.Retry-Aftercapped at 30 s.null, bootstrapped string payloads stay strings, and lifecycle events no longer includeversion/build.beforeSendlimitations now say the callbacks get the final event (Fixed link to "Spending money" section of the handbook. #682).Event optionsandCapturing AI eventsreference sections, and AI observability is marked as supported.optOut()/optIn(). Both shipped in 5.51.0;disable()/enable()are removed in 6.0.com.posthog.posthog.API_KEY→PROJECT_TOKEN. 6.0 no longer readsAPI_KEY, whilePROJECT_TOKENalready works on 5.x.minSdkVersion21 → 23. posthog-android already requires 23.feature-flags-code-flutter.mdx, shown on/docs/libraries/flutterand/docs/feature-flags/adding-feature-flag-code): usesPosthog().onFeatureFlags((loaded) { ... })beforesetup(), with a note for 5.x readers to keepconfig.onFeatureFlags.sendFeatureFlagEventinstead ofsendFeatureFlagEvents, which 6.0 removes.Every claim was checked against the 6.0 branches and posthog-ios 4.0. Vale reports no alerts on the changed lines, apart from "Podfile" flagged as a misspelling on lines that already used the word.
Not in this PR:
docs/onboarding/product-analytics/flutter.tsxanddocs/onboarding/session-replay/flutter.tsx) still say iOS 13. They need a separate PR at release.session-replay/_snippets/flutter-installation.mdxandsurveys/_snippets/flutter-surveys-installation.mdxalso say iOS 13, but nothing imports them, so I left them unchanged.Checklist
vercel.json🤖 Generated with Claude Code