Agrega PRIVACY.md, actualiza AGENTS.md

This commit is contained in:
Super User
2026-06-14 15:34:53 -04:00
parent 9ac9e9e953
commit 0df1bf90cf
20 changed files with 685 additions and 166 deletions

View File

@@ -32,35 +32,50 @@ class ServiciosScreen extends StatelessWidget {
itemCount: provider.servicios.length,
itemBuilder: (_, i) {
final s = provider.servicios[i];
return Card(
child: ListTile(
leading: CircleAvatar(
backgroundColor: Color(s.color),
child: Icon(_getIcon(s.icono), color: Colors.white),
return TweenAnimationBuilder<double>(
tween: Tween(begin: 0, end: 1),
duration: Duration(milliseconds: 300 + i * 60),
curve: Curves.easeOutCubic,
builder: (context, value, child) {
return Opacity(
opacity: value,
child: Transform.translate(
offset: Offset(0, 20 * (1 - value)),
child: child,
),
);
},
child: Card(
margin: const EdgeInsets.only(bottom: 8),
child: ListTile(
leading: CircleAvatar(
backgroundColor: Color(s.color),
child: Icon(_getIcon(s.icono), color: Colors.white),
),
title: Text(s.nombre, style: const TextStyle(fontWeight: FontWeight.w500)),
subtitle: Text('Vence día ${s.diaVencimiento}'),
trailing: IconButton(
icon: const Icon(Icons.delete_outline, color: Colors.red),
onPressed: () async {
final ok = await showDialog<bool>(
context: context,
builder: (_) => AlertDialog(
title: const Text('Eliminar servicio'),
content: Text('¿Eliminar ${s.nombre}? Se eliminarán sus facturas.'),
actions: [
TextButton(onPressed: () => Navigator.pop(context, false), child: const Text('Cancelar')),
TextButton(onPressed: () => Navigator.pop(context, true), child: const Text('Eliminar')),
],
),
);
if (ok == true) provider.eliminarServicio(s.id!);
},
),
onTap: () => Navigator.push(
context,
MaterialPageRoute(builder: (_) => CrearServicioScreen(servicio: s)),
).then((_) => provider.cargarServicios()),
),
title: Text(s.nombre),
subtitle: Text('Vence día ${s.diaVencimiento}'),
trailing: IconButton(
icon: const Icon(Icons.delete_outline, color: Colors.red),
onPressed: () async {
final ok = await showDialog<bool>(
context: context,
builder: (_) => AlertDialog(
title: const Text('Eliminar servicio'),
content: Text('¿Eliminar ${s.nombre}? Se eliminarán sus facturas.'),
actions: [
TextButton(onPressed: () => Navigator.pop(context, false), child: const Text('Cancelar')),
TextButton(onPressed: () => Navigator.pop(context, true), child: const Text('Eliminar')),
],
),
);
if (ok == true) provider.eliminarServicio(s.id!);
},
),
onTap: () => Navigator.push(
context,
MaterialPageRoute(builder: (_) => CrearServicioScreen(servicio: s)),
).then((_) => provider.cargarServicios()),
),
);
},