Skip to content

docs: Flutter property overrides for flag evaluation#17336

Open
turnipdabeets wants to merge 4 commits into
masterfrom
docs/flutter-flag-property-overrides
Open

docs: Flutter property overrides for flag evaluation#17336
turnipdabeets wants to merge 4 commits into
masterfrom
docs/flutter-flag-property-overrides

Conversation

@turnipdabeets
Copy link
Copy Markdown
Contributor

Adds Flutter/Dart documentation for the new setPersonPropertiesForFlags, setGroupPropertiesForFlags, and reset* APIs shipping in posthog_flutter (PostHog/posthog-flutter#412).

Changes

  • Property overrides page: added Dart/Flutter tabs to all six <MultiLanguage> examples (identify, group, setPersonPropertiesForFlags, reload control, reset, group overrides).
  • Flutter library page: new "Setting properties for flag evaluation" subsection linking to the property-overrides page.
  • Added Flutter to the mobile default-properties list.

Brings Flutter to parity with the iOS / Android / React Native docs for property overrides.

🤖 Generated with Claude Code

Add Dart/Flutter tabs to the property-overrides page (identify, group,
setPersonPropertiesForFlags, reload control, reset, group overrides) and a
short subsection on the Flutter library page, matching the new posthog_flutter
APIs. Add Flutter to the mobile default-properties list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Vale prose linter → found 4 errors, 27 warnings, 7 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/feature-flags/property-overrides.mdx — 0 errors, 3 warnings, 2 suggestions
Line Severity Message Rule
244:35 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
244:43 warning Use 'iOS' instead of 'ios'. Vale.Terms
316:85 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
501:62 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
656:69 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
contents/docs/libraries/flutter/index.mdx — 4 errors, 24 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
96:49 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
98:66 suggestion Address the reader directly. Use 'you' instead of 'the User'. PostHogDocs.DirectAddress
98:131 suggestion Address the reader directly. Use 'you' instead of 'the User'. PostHogDocs.DirectAddress
112:69 warning Avoid trivializing words. 'simply' can sound dismissive to the reader. PostHogDocs.Trivializers
139:4 warning 'Feature flags' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
139:4 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
164:25 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
168:8 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
168:55 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
168:128 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
176:28 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
176:54 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
178:4 warning 'Error tracking' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
178:4 warning Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. PostHogBase.ProductNames
180:11 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
182:4 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
182:4 warning 'Session replay' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
184:13 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
186:12 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
186:65 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
186:127 warning Avoid trivializing words. 'all you need to do' can sound dismissive to the reader. PostHogDocs.Trivializers
239:58 error Use straight quotes and apostrophes, not curly ones. PostHogDocs.CurlyQuotes
239:96 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
240:8 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
292: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
293: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
294: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
297:3 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
304:62 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
304:100 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
315:26 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Jun 08, 2026 02:28PM

@turnipdabeets turnipdabeets requested review from a team and removed request for a team June 5, 2026 22:18
```dart
// Set properties without reloading
await Posthog().setPersonPropertiesForFlags({'plan': 'enterprise'}, reloadFeatureFlags: false)
await Posthog().setPersonPropertiesForFlags({'company_size': 'large'}, reloadFeatureFlags: false)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meant group here?

Copy link
Copy Markdown
Contributor Author

@turnipdabeets turnipdabeets Jun 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call out, all the above examples used this so it was just copied but it do sound like a group and not a person. Updated this and the other examples above to make more sense.

turnipdabeets and others added 2 commits June 8, 2026 09:59
…rrides

Address review: company_size reads like a group attribute. Replace with an
unambiguously person-scoped property across all SDK tabs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address review: plan reads like a group/company attribute in person-property
examples. Use is_beta_user (clearly person-scoped) in all person examples across
SDK tabs; keep plan in group-property examples where a company plan is correct.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@turnipdabeets turnipdabeets requested a review from a team June 8, 2026 14:09
Person examples now target a 'beta-feature' flag with person-scoped props
(is_beta_user + country) instead of mismatched is_beta_user/signup_source vs an
'enterprise-feature' flag. Group examples keep the enterprise story.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@dustinbyrne dustinbyrne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, I do recommend swapping the country property for something like email (see below)

plan: 'enterprise',
company_size: 'large'
is_beta_user: true,
country: 'US'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not to be confused with the built-in $geoip_country_code - maybe we can do something like email: me@example.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for additional context, $geoip_* properties are generated from the /flags backend at request time and don't need to be set explicitly via setPersonPropertiesForFlags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants