[FEAT]: Follow the system light/dark setting until a theme is chosen

Aperta
#246 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
79/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, flutter
Ambito
mobile

Direzione di ricerca

Start with mobile/lib/themes/theme_provider.dart to see how the current theme is stored and updated, then read mobile/lib/main.dart for how MaterialApp receives it and mobile/lib/pages/settings/appearance.dart for saved choices. Check how the app can observe system brightness and how theme changes are tested. Done means the app follows light or dark system changes until a theme is chosen, and a saved choice takes precedence.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: mobile enhancement good first issue

Context

A new install always starts in Frost, the light theme (ThemeProvider._currentTheme = ThemeType.frost), even when the phone is set to dark mode.

What to do

  • Until the user picks a theme, follow the system setting: Frost when the system is light, Nebula (or Onyx) when it is dark, and switch when the system setting changes.
  • Once the user picks a theme in Appearance, keep their choice.
  • Optionally, add a "Match system" option at the top of the Appearance page.
  • Tests for the default in light and dark, and for a saved choice winning.

Where to look

mobile/lib/themes/theme_provider.dart, mobile/lib/main.dart (MaterialApp), mobile/lib/pages/settings/appearance.dart.

Good to know

MediaQuery.platformBrightnessOf(context) or PlatformDispatcher.instance.platformBrightness give the system setting.

Lingua principale
Dart
Stelle
9
Fork
5
Merge medio
49m
PR unite (30g)
34

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommandLineCoding/Elephant

Tutte le issue di CommandLineCoding/Elephant

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.