NeoTheme.light() / NeoTheme.dark() and override only the tokens you need via copyWith.
Extending Neo’s Default Themes
Neo ships carefully designed light and dark themes throughNeoTheme.light() and NeoTheme.dark(). Prefer copying those and overriding specific tokens instead of constructing every field from scratch.
Benefits of Extending Default Themes:
- Automatically inherit Neo’s color combinations
- Maintain consistency with Neo’s design system
- Reduce maintenance burden by leveraging tested color relationships
- Focus only on your brand customizations rather than rebuilding everything
- Brand colors (
brand,fgOnBrand) - Optional spacing, radius, or typography adjustments
- Nullable button/checkbox overrides on
NeoColorswhen you need global widget tinting
- Semantic colors (success, warning, danger)
- Ink ladders, fills, borders, and surface colors
- Cross-platform visual consistency
Project Structure
The standard Neo theming structure organizes your custom colors and themes:Creating Your Themes
Start from Neo’s factories and override only your brand colors:Using Your Custom Themes
Apply your custom themes in your app’s main file:Mixing Neo and Custom Colors
You can combine your custom colors with Neo’s built-in colors:Best Practices
Theme Architecture
- Start from
NeoTheme.light()/NeoTheme.dark()instead of building from scratch - Keep brand colors in separate palette files for organization
- Follow the standard
lib/theming/folder structure - Always create both light and dark theme variants
Customization Approach
- Start minimal - override only brand colors initially
- Use Neo’s semantic colors unless you have specific brand requirements
- Leverage
copyWithonNeoThemeandNeoColorsto preserve Neo’s tested relationships - Test thoroughly in both light and dark modes
Brand Integration
- Use your brand’s established color palette with Neo’s naming conventions
- Ensure sufficient contrast ratios for accessibility compliance

