Contributing: Theme Quick Start
March 20, 2026 · View on GitHub
This guide is for external contributors who want to open a PR mainly to customize the app color theme.
1. Add your theme in lib/model/app_theme.dart
- Copy an existing theme (usually
.dimor.lightsOut) and rename it, for example.myTheme. - Fill all required color fields (
primary,themePrimary,qb*,g*, input/message colors, etc.). - Set
isLightcorrectly (truefor light themes,falsefor dark themes). - Add the new case in
displayName. - Update
fromStringandtoStringfor backward-compatible persistence values.
2. Expose the theme in lib/widgets/theme_selector.dart
- Add a new
FormItemin theitemslist. - Add a handler similar to
_onDimPressed/_onLightsOutPressed:- update
P.preference.preferredDarkCustomTheme.q - persist
halo_state.preferredDarkCustomTheme
- update
- Reuse selected-state UI logic:
preferredDarkCustomTheme == .yourTheme.
Note: Current structure is "one light theme + multiple dark themes". If you add extra light themes, also update sync logic in lib/store/app.dart.
3. What Args.debuggingThemes does
- Launch arg:
--dart-define=debuggingThemes=true - Behavior in debug mode: app toggles every second between
.lightand current dark preference (preferredDarkCustomTheme). - Purpose: quickly verify contrast/readability and theme coverage on the same screen.
4. Launch desktop + mobile UI together in .vscode/launch.json
- Keep per-platform launch configs (for example macOS, Android, iOS).
- Group them in a
compoundsentry (for exampleall (Halo)). - Run the compound config to start multi-platform UI side by side.
Optional: add --dart-define=debuggingThemes=true in the related launch configs for auto light/dark preview.