Enhance theme management and UI settings

- Updated AppThemeMode enum to include icons and added fromValue method for easier theme retrieval.
- Modified ThemeBloc to manage currentTheme instead of themeMode.
- Enhanced ThemeState to reflect currentTheme and updated copyWith method.
- Added ThemeSettingsView for user-friendly theme selection in settings.
- Improved fluxLightTheme and fluxDarkTheme with new listTileTheme and color settings.
- Updated settings view to navigate to ThemeSettingsView.
- Added entitlements for network client permissions in Debug and Release profiles.
- Introduced Podfile.lock for dependency management.
- Added devtools_options.yaml for Dart & Flutter DevTools configuration.
This commit is contained in:
2026-04-06 08:48:10 +02:00
parent 28b2abdff3
commit c6c61f1a31
13 changed files with 281 additions and 19 deletions

View File

@@ -69,6 +69,13 @@ ThemeData fluxDarkTheme = ThemeData(
onPrimary: Colors.white,
onSurface: FluxColors.darkTextPrimary,
),
hoverColor: FluxColors.accentTurquoise.withValues(
alpha: 0.08,
), // <--- AGGIUNGI QUESTO
splashColor: FluxColors.accentTurquoise.withValues(
alpha: 0.12,
), // <--- AGGIUNGI QUESTO
highlightColor: Colors.transparent,
textTheme: _buildFluxTextTheme(
ThemeData.dark().textTheme,
@@ -97,6 +104,28 @@ ThemeData fluxDarkTheme = ThemeData(
),
),
listTileTheme: ListTileThemeData(
// Definiamo la forma arrotondata (fondamentale per l'effetto moderno)
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
// Colore dell'icona (Turchese Flux)
iconColor: FluxColors.accentTurquoise,
// Colore del testo
titleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextPrimary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
subtitleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextSecondary,
fontSize: 13,
),
// Per far apparire la "manina" su Web/Desktop
mouseCursor: WidgetStateProperty.all(SystemMouseCursors.click),
// NOTA: Se overlayColor non esiste, Flutter userà i colori
// di default del tema (splashColor e hoverColor) definiti nel ThemeData generale.
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: FluxColors.primaryBlue,
@@ -120,6 +149,9 @@ ThemeData fluxLightTheme = ThemeData(
primaryColor: FluxColors.primaryBlue,
// Sfondo chiarissimo per staccare dalle card bianche
scaffoldBackgroundColor: FluxColors.lightBackground,
hoverColor: FluxColors.primaryBlue.withValues(alpha: 0.05),
splashColor: FluxColors.primaryBlue.withValues(alpha: 0.1),
highlightColor: Colors.transparent,
colorScheme: const ColorScheme.light(
primary: FluxColors.primaryBlue,
@@ -157,6 +189,28 @@ ThemeData fluxLightTheme = ThemeData(
),
),
listTileTheme: ListTileThemeData(
// Definiamo la forma arrotondata (fondamentale per l'effetto moderno)
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
// Colore dell'icona (Turchese Flux)
iconColor: FluxColors.accentTurquoise,
// Colore del testo
titleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextPrimary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
subtitleTextStyle: GoogleFonts.poppins(
color: FluxColors.darkTextSecondary,
fontSize: 13,
),
// Per far apparire la "manina" su Web/Desktop
mouseCursor: WidgetStateProperty.all(SystemMouseCursors.click),
// NOTA: Se overlayColor non esiste, Flutter userà i colori
// di default del tema (splashColor e hoverColor) definiti nel ThemeData generale.
),
// Il pulsante principale rimane Blu Elettrico, molto visibile
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
@@ -187,3 +241,14 @@ ThemeData fluxLightTheme = ThemeData(
// Colore delle icone generiche
iconTheme: const IconThemeData(color: FluxColors.lightTextSecondary),
);
extension FluxThemeContext on BuildContext {
// Recupera il colore 'secondary' definito nel tuo ColorScheme (il Turchese Flux)
Color get accent => Theme.of(this).colorScheme.secondary;
// Puoi aggiungere anche questi per comodità futura:
Color get primary => Theme.of(this).colorScheme.primary;
Color get surface => Theme.of(this).colorScheme.surface;
Color get primaryText =>
Theme.of(this).textTheme.titleLarge?.color ?? Colors.black;
}