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

Offen
#246 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
79/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
dart, flutter
Bereich
mobile

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Dart
Sterne
9
Forks
5
Ø Merge
49 Min.
Gemergte PRs (30 T.)
34

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CommandLineCoding/Elephant

Alle Issues in CommandLineCoding/Elephant

Ähnliche Issues

Weitere Issues zu Dart

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.