Refactor theme colors and styles across the application

- Introduced AppColors class to centralize color definitions for better maintainability and consistency.
- Updated various screens (Settings, Vault Access, Note Card, etc.) to use AppColors for styling instead of hardcoded colors.
- Enhanced UI elements with improved color contrast and accessibility.
- Replaced gradient backgrounds with defined color schemes for a cohesive look.
- Refactored button styles and text colors to align with the new theme structure.
This commit is contained in:
2026-05-23 09:38:26 +02:00
parent 814f8f7c04
commit f4bb5104e2
14 changed files with 488 additions and 300 deletions
+20 -21
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:notas/theme/app_colors.dart';
class BiometricChoiceScreen extends StatelessWidget {
const BiometricChoiceScreen({
@@ -16,17 +17,7 @@ class BiometricChoiceScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color(0xFF191A1D),
Color(0xFF222326),
Color(0xFF101114),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
decoration: const BoxDecoration(gradient: AppColors.backdropGradient),
child: SafeArea(
child: Column(
children: [
@@ -39,12 +30,12 @@ class BiometricChoiceScreen extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: const Color(0xFF1D1E20),
color: AppColors.surface,
borderRadius: BorderRadius.circular(24),
border: Border.all(color: Colors.white.withValues(alpha: 0.08)),
border: Border.all(color: AppColors.borderMuted),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.35),
color: AppColors.shadow,
blurRadius: 30,
offset: const Offset(0, 18),
),
@@ -64,7 +55,7 @@ class BiometricChoiceScreen extends StatelessWidget {
'Proteger con huella',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
color: AppColors.textPrimary,
fontSize: 28,
fontWeight: FontWeight.w700,
),
@@ -74,7 +65,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: Colors.white.withValues(alpha: 0.72),
color: AppColors.textSecondary,
height: 1.4,
),
),
@@ -82,13 +73,17 @@ class BiometricChoiceScreen extends StatelessWidget {
FilledButton(
onPressed: isBusy ? null : onEnableBiometrics,
style: FilledButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 14),
padding: const EdgeInsets.symmetric(
vertical: 14,
),
),
child: isBusy
? const SizedBox(
width: 18,
height: 18,
child: CircularProgressIndicator(strokeWidth: 2),
child: CircularProgressIndicator(
strokeWidth: 2,
),
)
: const Text('Sí, activar huella'),
),
@@ -96,9 +91,13 @@ class BiometricChoiceScreen extends StatelessWidget {
OutlinedButton(
onPressed: isBusy ? null : onSkipBiometrics,
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 14),
side: const BorderSide(color: Colors.white24),
foregroundColor: Colors.white,
padding: const EdgeInsets.symmetric(
vertical: 14,
),
side: const BorderSide(
color: AppColors.textDisabled,
),
foregroundColor: AppColors.textPrimary,
),
child: const Text('No, entrar sin huella'),
),