Theming & Localization
Relevant source files
The following files were used as context for generating this wiki page:
Conduit provides a highly customizable user experience through adaptive UI components and extensive multi-language support. The system integrates native platform aesthetics—Material Design for Android and Cupertino for iOS—while allowing user-defined accent palettes and theme modes.
Localization ensures the application is accessible across 14 different locales. The architecture separates UI styling and text resources into dedicated packages and platform-specific resource files to maintain a clean separation of concerns.
Sources: README.md:162-168, pubspec.yaml:26-30
Theming Architecture
The project uses a dedicated workspace package, conduit_theme, to manage shared styling logic. The UI adapts to the host platform using a "platform UI seam," which allows the application to switch between Material and Cupertino widgets.
Adaptive UI Components
Conduit utilizes an allowlist mechanism to manage the migration of widgets to the platform UI seam. This ensures that features like chat, workspace, and settings use the appropriate native design tokens.
The diagram shows how the platform UI seam directs the application to use either Material or Cupertino components based on the operating system.
Sources: pubspec.yaml:29, tool/platform_ui_allowlist.yaml:6-15
Personalization Options
Users can choose between Light, Dark, and System themes. The application supports five distinct accent palettes and includes specific support for haptic feedback and accessibility enhancements.
| Feature | Description |
|---|---|
| Theme Modes | Supports Light, Dark, and automatic System-based switching. |
| Accent Palettes | Provides five selectable color schemes for UI elements. |
| Adaptive UI | Switches between Material and Cupertino layouts natively. |
| Accessibility | Includes enhanced accessibility services and error handlers. |
Sources: README.md:162-168, tool/platform_ui_allowlist.yaml:457-480
Native Platform Resources
Conduit maintains native resource files for platform-specific integrations, such as home screen widgets and system-level UI elements.
Android Resource Configuration
The Android implementation defines Material 3 colors for widgets in both light and dark modes. It utilizes system accent colors (e.g., system_accent1_600) when available on Android 12+, with static hex fallbacks for older versions.
<!-- android/app/src/main/res/values/colors.xml -->
<resources>
<color name="widget_primary">@android:color/system_accent1_600</color>
<color name="widget_mic_background">@android:color/system_accent1_100</color>
<color name="widget_surface_fallback">#FFFBFE</color>
</resources>
Sources: android/app/src/main/res/values/colors.xml:5-24, android/app/src/main/res/values-night/colors.xml:5-24
Localization
Conduit supports 14 locales to serve a global user base. The localization system is built on Flutter's flutter_localizations package and manages translation resources for all supported languages.
Supported Locales
The application includes translations for the following languages:
- English, German, Spanish, French, Italian
- Japanese, Korean, Dutch, Russian
- Simplified and Traditional Chinese
- Czech, Slovak, Polish
Sources: README.md:169-171, pubspec.yaml:37-38
String Resource Management
Native strings for platform features like Android Widgets are stored in strings.xml. These include labels for quick actions such as "Ask Conduit," "Camera," "Photos," and "Voice."
| String ID | Value | Context |
|---|---|---|
widget_name | Conduit | App name displayed on the widget |
widget_ask_conduit | Ask Conduit | Primary call-to-action for chat |
widget_mic | Voice | Label for voice input shortcut |
Sources: android/app/src/main/res/values/strings.xml:1-12
Implementation Details
The implementation relies on flutter_riverpod for state management of theme settings and conduit_theme for styling tokens.
Theme Integration Flow
AppThemedefines the base visual properties.ColorTokensprovides specific semantic colors for UI elements.ThemeProvidersmanage the current state of the theme (e.g., which accent palette is active).- Adaptive widgets query the
PlatformServiceto determine the correct design language to render.
Sources: pubspec.yaml:45-48, tool/platform_ui_allowlist.yaml:500-530
Conduit ensures that the UI remains consistent with mobile standards by avoiding web-view wrappers and instead using native Flutter surfaces that respect system-level theming and localization settings.
Sources: README.md:144-155