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

Aberta
#246 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
79/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
dart, flutter
Domínio
mobile

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Dart
Estrelas
9
Forks
5
Merge médio
49min
PRs com merge (30d)
34

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de CommandLineCoding/Elephant

Todas as issues de CommandLineCoding/Elephant

Issues semelhantes

Mais issues de Dart

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.