refactor: Update color handling to use ARGB format and improve theme consistency

This commit is contained in:
2026-07-01 10:41:59 +02:00
parent 82515960f6
commit 972006c29f
5 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -361,7 +361,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
Widget _buildThemeColorButton(Color color) {
final AppPalette palette = Theme.of(context).extension<AppPalette>()!;
final bool isSelected = _selectedSeedColor.value == color.value;
final bool isSelected = _selectedSeedColor.toARGB32() == color.toARGB32();
final Color foregroundColor =
ThemeData.estimateBrightnessForColor(color) == Brightness.dark
? palette.textPrimary
@@ -370,7 +370,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
return Semantics(
button: true,
selected: isSelected,
label: 'Color ${color.value.toRadixString(16)}',
label: 'Color ${color.toARGB32().toRadixString(16)}',
child: Tooltip(
message: isSelected ? 'Color actual' : 'Usar este color',
child: InkWell(
@@ -490,6 +490,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
);
}
@override
Widget build(BuildContext context) {
final AppPalette palette = Theme.of(context).extension<AppPalette>()!;