Refactor theme management: Replace AppColors with AppPalette

- Removed AppColors class and migrated all references to AppPalette.
- Updated VaultAccessScreen, MenuDrawer, NoteCard, SearchAppBar, and other widgets to use AppPalette for color management.
- Introduced AppPalette to handle light and dark themes with appropriate color schemes.
- Adjusted theme application in AppTheme to utilize AppPalette extensions.
- Updated tests to reflect changes in theme structure and color references.
This commit is contained in:
2026-05-23 13:55:40 +02:00
parent 29881183ed
commit 1dede9eb78
16 changed files with 1031 additions and 618 deletions
+11 -11
View File
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:notas/theme/app_colors.dart';
import 'package:notas/theme/app_palette.dart';
class BiometricChoiceScreen extends StatelessWidget {
const BiometricChoiceScreen({
@@ -15,9 +15,11 @@ class BiometricChoiceScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
final AppPalette palette = Theme.of(context).extension<AppPalette>()!;
return Scaffold(
body: Container(
decoration: const BoxDecoration(gradient: AppColors.backdropGradient),
decoration: BoxDecoration(gradient: palette.backdropGradient),
child: SafeArea(
child: Column(
children: [
@@ -30,12 +32,12 @@ class BiometricChoiceScreen extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: AppColors.surface,
color: palette.cardBackground,
borderRadius: BorderRadius.circular(24),
border: Border.all(color: AppColors.borderMuted),
border: Border.all(color: palette.border),
boxShadow: [
BoxShadow(
color: AppColors.shadow,
color: palette.shadowSoft,
blurRadius: 30,
offset: const Offset(0, 18),
),
@@ -55,7 +57,7 @@ class BiometricChoiceScreen extends StatelessWidget {
'Proteger con huella',
textAlign: TextAlign.center,
style: TextStyle(
color: AppColors.textPrimary,
color: Colors.white,
fontSize: 28,
fontWeight: FontWeight.w700,
),
@@ -65,7 +67,7 @@ class BiometricChoiceScreen extends StatelessWidget {
'¿Quieres que la app te pida huella o cara antes de entrar a tus notas?',
textAlign: TextAlign.center,
style: TextStyle(
color: AppColors.textSecondary,
color: palette.textSecondary,
height: 1.4,
),
),
@@ -94,10 +96,8 @@ class BiometricChoiceScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(
vertical: 14,
),
side: const BorderSide(
color: AppColors.textDisabled,
),
foregroundColor: AppColors.textPrimary,
side: BorderSide(color: palette.border),
foregroundColor: palette.textPrimary,
),
child: const Text('No, entrar sin huella'),
),