diff --git a/lib/app.dart b/lib/app.dart index 7d29120..dcb442a 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -212,7 +212,7 @@ class _NotesAppState extends State Future _setThemeSeedColor(Color color) async { final SharedPreferences prefs = await SharedPreferences.getInstance(); - await prefs.setInt(_themeSeedColorKey, color.value); + await prefs.setInt(_themeSeedColorKey, color.toARGB32()); if (!mounted) { return; diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 5b1a515..0a5dcb0 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -361,7 +361,7 @@ class _SettingsScreenState extends State { Widget _buildThemeColorButton(Color color) { final AppPalette palette = Theme.of(context).extension()!; - 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 { 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 { ); } + @override Widget build(BuildContext context) { final AppPalette palette = Theme.of(context).extension()!; diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index 6542b7d..4bf70a8 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -24,7 +24,7 @@ class AppTheme { return ThemeData( useMaterial3: true, - scaffoldBackgroundColor: scheme.background, + scaffoldBackgroundColor: scheme.surface, colorScheme: scheme, extensions: >[palette], brightness: brightness, diff --git a/lib/widgets/menu_drawer.dart b/lib/widgets/menu_drawer.dart index 795d782..7782230 100644 --- a/lib/widgets/menu_drawer.dart +++ b/lib/widgets/menu_drawer.dart @@ -61,10 +61,10 @@ class MenuDrawer extends StatelessWidget { ? null : () => onEditCategory?.call(category), iconColor: Color( - category.colorValue ?? palette.accent.value, + category.colorValue ?? palette.accent.toARGB32(), ), textColor: Color( - category.colorValue ?? palette.accent.value, + category.colorValue ?? palette.accent.toARGB32(), ), trailing: IconButton( padding: const EdgeInsets.all(8), diff --git a/lib/widgets/search_app_bar.dart b/lib/widgets/search_app_bar.dart index f1f19c2..e532770 100644 --- a/lib/widgets/search_app_bar.dart +++ b/lib/widgets/search_app_bar.dart @@ -94,7 +94,7 @@ class _SearchAppBarState extends State { decoration: InputDecoration( hintText: widget.searchHint, hintStyle: TextStyle( - color: palette.textSecondary.withOpacity(0.6), + color: palette.textSecondary.withValues(alpha: 0.6), ), suffixIcon: _searchController.text.isNotEmpty ? IconButton(