Skip to content

[Feature] Add Light Theme Toggle with Sun Button #8

Description

Overview

Add light theme support to CondorCode with a single toggle button. Currently the app uses a dark theme by default. Users should be able to switch between dark and light modes, with the preference persisted across sessions.

Requirements

UI Toggle

Location: Right side of the screen (app bar or action panel)

Button: Sun icon ☀️ (or moon 🌙 when in light mode)

Behavior:

  • Single tap toggles between dark ↔ light
  • Animated transition between icons (sun → moon or moon → sun)
  • Smooth theme transition across the entire app

Theme Behavior

Dark Theme (Current)

  • AppColors.grey800 — background
  • AppColors.grey600 — cards
  • AppColors.white — text
  • AppColors.neon — accents

Light Theme (New)

  • Light background (white/off-white)
  • Dark text for readability
  • Keep AppColors.neon as accent color
  • Adjust all grey scales appropriately

Scope

All screens must support both themes:

  • /home — Home screen
  • /courses — Course list
  • /course/:id — Course screen with side panels
  • /knowledgeCheck/* — Knowledge check screens
  • /knowledgeBase/* — Knowledge base screens
  • /contacts — Contacts screen
  • /lesson/* — Quiz/test screens
  • Any other screens

Technical Requirements

State Management:

  • Use existing state management (Bloc/Cubit for main app, Riverpod for admin)
  • Create ThemeCubit or extend existing theme handling
  • Persist preference to local storage (SharedPreferences or similar)

Implementation approach:

  • Define ThemeMode (dark/light)
  • Create theme data for light mode
  • Wrap app in BlocBuilder<ThemeCubit, ThemeMode> or similar
  • Apply theme at MaterialApp level

Files to modify:

  • Main app entry point — apply theme
  • Each screen — verify colors use theme, not hardcoded
  • Widgets in ui_kit — ensure theme-aware colors

Design Freedom

No mockups provided — contributor should:

  • Choose appropriate light theme colors
  • Ensure sufficient contrast for accessibility
  • Test on both web and mobile
  • Propose color scheme in PR for feedback

Suggested approach:

  • Background: Colors.grey[50] or white
  • Cards: Colors.grey[100] or white with shadow
  • Text: Colors.grey[900] or black87
  • Secondary text: Colors.grey[600]
  • Accents: keep existing AppColors.neon

Definition of Done

  • Sun/moon toggle button added to app bar or action panel
  • Toggle switches theme immediately without restart
  • Preference persisted across app restarts
  • All screens work in light theme
  • No hardcoded colors that break theme switching
  • Smooth animated transitions between themes
  • Tested on web (Chrome, Firefox)
  • Tested on mobile (iOS/Android if applicable)
  • Accessibility: sufficient contrast in both themes
  • PR includes screenshots of both themes

Labels

feature, good first issue, help wanted, ui/ux


Want to work on this? Comment below and we'll assign it to you!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions