feat: Update dialog styles and background colors for consistency across screens

This commit is contained in:
2026-05-23 11:27:26 +02:00
parent f4bb5104e2
commit 29881183ed
5 changed files with 37 additions and 5 deletions
+5
View File
@@ -430,6 +430,11 @@ class _NotesAppState extends State<NotesApp>
final bool? retry = await showDialog<bool>(
context: dialogCtx,
builder: (BuildContext context) => AlertDialog(
backgroundColor: AppColors.cardBackground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: AppColors.border),
),
title: const Text('No se pudo activar la biometría'),
content: const Text(
'No se pudo activar la biometría. ¿Quieres intentarlo de nuevo o entrar sin huella?',
+16 -3
View File
@@ -935,6 +935,11 @@ class _CategoryDialogState extends State<_CategoryDialog> {
final bool? confirm = await showDialog<bool>(
context: context,
builder: (BuildContext context) => AlertDialog(
backgroundColor: AppColors.cardBackground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: AppColors.border),
),
title: const Text('Borrar categoría'),
content: const Text('¿Seguro que quieres borrar esta categoría?'),
actions: [
@@ -943,6 +948,7 @@ class _CategoryDialogState extends State<_CategoryDialog> {
child: const Text('Cancelar'),
),
TextButton(
style: TextButton.styleFrom(foregroundColor: AppColors.destructive),
onPressed: () => Navigator.pop(context, true),
child: const Text('Borrar'),
),
@@ -957,12 +963,14 @@ class _CategoryDialogState extends State<_CategoryDialog> {
try {
await widget.repository.deleteCategory(widget.category!.id);
await widget.onCategoriesChanged();
try {
await widget.onRequestSync();
} catch (_) {}
// Notify parent to switch view to all notes when a category is deleted.
await widget.onCategoryDeleted();
if (mounted) {
Navigator.pop(context);
}
try {
await widget.onRequestSync();
} catch (_) {}
} catch (e) {
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
@@ -975,6 +983,11 @@ class _CategoryDialogState extends State<_CategoryDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
backgroundColor: AppColors.cardBackground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: AppColors.border),
),
title: Text(
widget.category == null ? 'Crear categoría' : 'Editar categoría',
),
+5 -1
View File
@@ -202,7 +202,11 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
final bool isDeletedNote = _currentNote.isDeleted;
return AlertDialog(
backgroundColor: AppColors.surfaceElevated,
backgroundColor: AppColors.cardBackground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: AppColors.border),
),
title: Text(
isDeletedNote ? 'Eliminar permanentemente' : 'Eliminar nota',
style: const TextStyle(color: AppColors.textPrimary),
+10
View File
@@ -43,6 +43,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
final bool? confirmed = await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
backgroundColor: AppColors.cardBackground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: AppColors.border),
),
title: const Text('Borrar todos los datos'),
content: const Text(
'¿Estás seguro? Esta acción eliminará la base de datos local y la clave de cifrado. Asegúrate de tener una copia de seguridad si es necesario o cuenta sincronizada.',
@@ -96,6 +101,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
final bool? confirmed = await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
backgroundColor: AppColors.cardBackground,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: BorderSide(color: AppColors.border),
),
title: const Text('Borrar toda la info del servidor'),
content: const Text(
'¿Estás seguro? Esta acción eliminará toda la información almacenada en el servidor y no se puede deshacer.',
+1 -1
View File
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:notas/theme/app_colors.dart';
class AppTheme {
static ThemeData theme({Color seedColor = Colors.amber}) {
static ThemeData theme({Color seedColor = AppColors.defaultThemeSeedColor}) {
final Brightness foregroundBrightness =
ThemeData.estimateBrightnessForColor(seedColor);
final Color foregroundColor = foregroundBrightness == Brightness.dark