This commit is contained in:
2026-04-06 10:55:56 +02:00
parent c6c61f1a31
commit 4930d25e58
15 changed files with 658 additions and 11 deletions

View File

@@ -243,12 +243,24 @@ ThemeData fluxLightTheme = ThemeData(
);
extension FluxThemeContext on BuildContext {
// Recupera il colore 'secondary' definito nel tuo ColorScheme (il Turchese Flux)
Color get accent => Theme.of(this).colorScheme.secondary;
// --- Colori del Brand ---
Color get primary => Theme.of(this).colorScheme.primary; // Blu Flux
Color get accent => Theme.of(this).colorScheme.secondary; // Turchese Flux
// Puoi aggiungere anche questi per comodità futura:
Color get primary => Theme.of(this).colorScheme.primary;
// --- Superfici ---
Color get surface => Theme.of(this).colorScheme.surface;
Color get background =>
Theme.of(this).colorScheme.surfaceContainerHighest; // O background
// --- Testi (La parte mancante) ---
// Mappiamo primaryText sul colore del titolo e secondaryText su quello del corpo
Color get primaryText =>
Theme.of(this).textTheme.titleLarge?.color ?? Colors.black;
Theme.of(this).textTheme.titleLarge?.color ?? Colors.white;
Color get secondaryText =>
Theme.of(this).textTheme.bodyMedium?.color ?? Colors.grey;
// Opzionale: un colore ancora più tenue per suggerimenti o icone disabilitate
Color get hintText =>
Theme.of(this).textTheme.bodySmall?.color ??
Colors.grey.withValues(alpha: 0.5);
}