docs: Flutter property overrides for flag evaluation#17336
docs: Flutter property overrides for flag evaluation#17336turnipdabeets wants to merge 4 commits into
Conversation
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>
|
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!
|
| 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 |
Deploy preview
|
| ```dart | ||
| // Set properties without reloading | ||
| await Posthog().setPersonPropertiesForFlags({'plan': 'enterprise'}, reloadFeatureFlags: false) | ||
| await Posthog().setPersonPropertiesForFlags({'company_size': 'large'}, reloadFeatureFlags: false) |
There was a problem hiding this comment.
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.
…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>
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>
dustinbyrne
left a comment
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
not to be confused with the built-in $geoip_country_code - maybe we can do something like email: me@example.com
There was a problem hiding this comment.
for additional context, $geoip_* properties are generated from the /flags backend at request time and don't need to be set explicitly via setPersonPropertiesForFlags
Adds Flutter/Dart documentation for the new
setPersonPropertiesForFlags,setGroupPropertiesForFlags, andreset*APIs shipping inposthog_flutter(PostHog/posthog-flutter#412).Changes
<MultiLanguage>examples (identify, group,setPersonPropertiesForFlags, reload control, reset, group overrides).Brings Flutter to parity with the iOS / Android / React Native docs for property overrides.
🤖 Generated with Claude Code