Summary
The Flutter SDK has built-in survey UI but doesn't apply the fontFamily from survey appearance settings.
Current State
PostHogDisplaySurveyAppearance includes fontFamily field
- Built-in survey widgets use hardcoded
TextStyle without fontFamily
- The data is parsed but not used
Expected Behavior
When a survey is configured with a custom fontFamily, the built-in survey UI should apply that font (if available/bundled in the app), falling back to system default if not found.
Reference Implementation
See posthog-ios SurveySheet.swift:
static func customFont(family: String) -> Font? {
if let uiFont = UIFont(name: family, size: UIFont.systemFontSize) {
return Font(uiFont)
}
return nil // Falls back to system default
}
Implementation Notes
- Pass
fontFamily to TextStyle in survey widgets (e.g., question_header.dart, survey_button.dart, etc.)
- Font must be declared in
pubspec.yaml and bundled with the app
- Fall back to system default if font not found
Summary
The Flutter SDK has built-in survey UI but doesn't apply the
fontFamilyfrom survey appearance settings.Current State
PostHogDisplaySurveyAppearanceincludesfontFamilyfieldTextStylewithoutfontFamilyExpected Behavior
When a survey is configured with a custom
fontFamily, the built-in survey UI should apply that font (if available/bundled in the app), falling back to system default if not found.Reference Implementation
See posthog-ios
SurveySheet.swift:Implementation Notes
fontFamilytoTextStylein survey widgets (e.g.,question_header.dart,survey_button.dart, etc.)pubspec.yamland bundled with the app