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
+17 -8
View File
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:notas/models/note.dart';
import 'package:notas/theme/app_colors.dart';
// Small presentational widget for a note inside the grid.
// Keep this widget lightweight and layout-agnostic: it should not force
@@ -33,7 +34,9 @@ class _NoteCardState extends State<NoteCard> {
final bool showGrabbing = widget.isDragging || _isPressed;
return MouseRegion(
cursor: showGrabbing ? SystemMouseCursors.grabbing : SystemMouseCursors.grab,
cursor: showGrabbing
? SystemMouseCursors.grabbing
: SystemMouseCursors.grab,
child: GestureDetector(
onTapDown: widget.onTap == null
? null
@@ -60,10 +63,10 @@ class _NoteCardState extends State<NoteCard> {
child: Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: const Color.fromRGBO(24, 25, 26, 1),
color: AppColors.cardBackground,
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: widget.borderColor ?? Colors.white24,
color: widget.borderColor ?? AppColors.textDisabled,
width: 1,
),
),
@@ -87,7 +90,10 @@ class _NoteCardState extends State<NoteCard> {
final TextPainter textPainter = TextPainter(
text: TextSpan(
text: widget.note.body,
style: const TextStyle(color: Colors.white70, fontSize: 14),
style: const TextStyle(
color: AppColors.textSecondary,
fontSize: 14,
),
),
maxLines: 20,
textDirection: TextDirection.ltr,
@@ -105,7 +111,7 @@ class _NoteCardState extends State<NoteCard> {
Text(
widget.note.title,
style: const TextStyle(
color: Colors.white,
color: AppColors.textPrimary,
fontSize: 16,
fontWeight: FontWeight.bold,
),
@@ -115,7 +121,10 @@ class _NoteCardState extends State<NoteCard> {
const SizedBox(height: 8),
Text(
widget.note.body,
style: const TextStyle(color: Colors.white70, fontSize: 14),
style: const TextStyle(
color: AppColors.textSecondary,
fontSize: 14,
),
maxLines: 20,
overflow: TextOverflow.clip,
),
@@ -124,7 +133,7 @@ class _NoteCardState extends State<NoteCard> {
const Text(
'...',
style: TextStyle(
color: Colors.white54,
color: AppColors.textMuted,
fontSize: 18,
height: 1,
),
@@ -138,4 +147,4 @@ class _NoteCardState extends State<NoteCard> {
),
);
}
}
}