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:
@@ -1,12 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
enum AppThemeMode {
|
||||
light('light', 'Chiaro', ThemeMode.light),
|
||||
dark('dark', 'Scuro', ThemeMode.dark),
|
||||
system('system', 'Sistema', ThemeMode.system);
|
||||
light('light', 'Chiaro', ThemeMode.light, Icons.light_mode),
|
||||
dark('dark', 'Scuro', ThemeMode.dark, Icons.dark_mode),
|
||||
system('system', 'Sistema', ThemeMode.system, Icons.brightness_auto);
|
||||
|
||||
const AppThemeMode(this.value, this.label, this.themeMode);
|
||||
const AppThemeMode(this.value, this.label, this.themeMode, this.icon);
|
||||
final String value;
|
||||
final String label;
|
||||
final ThemeMode themeMode;
|
||||
final IconData icon;
|
||||
|
||||
static AppThemeMode fromValue(String? value) {
|
||||
return AppThemeMode.values.firstWhere(
|
||||
(e) => e.value == value,
|
||||
orElse: () => AppThemeMode.system,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user