ui: reducir tamaño de botones pánico y soporte en MensajeríaPage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Pablinux
2026-04-16 03:22:18 -05:00
co-authored by Claude Sonnet 4.6
parent 4fd962ac8c
commit c52bb090b3
+32 -60
View File
@@ -148,20 +148,16 @@ class _MensajeriaPageState extends State<MensajeriaPage> {
], ],
); );
// ── Tarjetas de acción rápida ────────────────────────────────────────────── // ── Tarjetas de acción rápida (compactas) ────────────────────────────────
Widget _tarjetasAccion() => Padding( Widget _tarjetasAccion() => Padding(
padding: const EdgeInsets.fromLTRB(16, 16, 16, 0), padding: const EdgeInsets.fromLTRB(16, 10, 16, 0),
child: Row( child: Row(children: [
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded( Expanded(
child: _accionCard( child: _accionChip(
color: AppColors.error, color: AppColors.error,
bgColor: const Color(0xFF2A0A0A), bgColor: const Color(0xFF2A0A0A),
borderColor: AppColors.error,
icon: Icons.warning_rounded, icon: Icons.warning_rounded,
titulo: 'BOTÓN DE\nPÁNICO', label: 'PÁNICO',
descripcion: 'Activa alerta de emergencia inmediata',
labelBoton: 'ACTIVAR', labelBoton: 'ACTIVAR',
onTap: () async { onTap: () async {
final m = Mensaje( final m = Mensaje(
@@ -175,15 +171,13 @@ class _MensajeriaPageState extends State<MensajeriaPage> {
}, },
), ),
), ),
const SizedBox(width: 12), const SizedBox(width: 10),
Expanded( Expanded(
child: _accionCard( child: _accionChip(
color: AppColors.primary, color: AppColors.primary,
bgColor: const Color(0xFF001228), bgColor: const Color(0xFF001228),
borderColor: AppColors.primary,
icon: Icons.headset_mic_rounded, icon: Icons.headset_mic_rounded,
titulo: 'SOPORTE Y\nASISTENCIA', label: 'SOPORTE',
descripcion: 'Comunícate con nuestro equipo 24/7',
labelBoton: 'CONTACTAR', labelBoton: 'CONTACTAR',
onTap: () async { onTap: () async {
final m = Mensaje( final m = Mensaje(
@@ -197,71 +191,49 @@ class _MensajeriaPageState extends State<MensajeriaPage> {
}, },
), ),
), ),
], ]),
),
); );
Widget _accionCard({ Widget _accionChip({
required Color color, required Color color,
required Color bgColor, required Color bgColor,
required Color borderColor,
required IconData icon, required IconData icon,
required String titulo, required String label,
required String descripcion,
required String labelBoton, required String labelBoton,
required VoidCallback onTap, required VoidCallback onTap,
}) => }) =>
Container( Container(
padding: const EdgeInsets.all(14), padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor, color: bgColor,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: borderColor.withOpacity(0.4), width: 1),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: color.withOpacity(0.15),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
border: Border.all(color: color.withOpacity(0.35), width: 1),
), ),
child: Icon(icon, color: color, size: 22), child: Row(children: [
Icon(icon, color: color, size: 18),
const SizedBox(width: 8),
Expanded(
child: Text(label,
style: appLabel(
size: 11, weight: FontWeight.bold,
color: AppColors.onSurface, spacing: 0.5)),
), ),
const SizedBox(height: 10), const SizedBox(width: 6),
Text(titulo, GestureDetector(
style: appHeadline( onTap: onTap,
size: 13, weight: FontWeight.w800, child: Container(
color: AppColors.onSurface)), padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
const SizedBox(height: 4), decoration: BoxDecoration(
Text(descripcion, color: color,
style: appLabel(size: 10, color: AppColors.onSurfaceVariant), borderRadius: BorderRadius.circular(6),
maxLines: 2),
const SizedBox(height: 12),
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: onTap,
style: ElevatedButton.styleFrom(
primary: color,
onPrimary: Colors.white,
padding: const EdgeInsets.symmetric(vertical: 9),
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)),
), ),
child: Text(labelBoton, child: Text(labelBoton,
style: appLabel( style: appLabel(
size: 11, size: 10, weight: FontWeight.bold,
weight: FontWeight.bold, color: Colors.white, spacing: 0.5)),
color: Colors.white,
spacing: 1.5)),
), ),
), ),
], ]),
),
); );
String _horaActual() { String _horaActual() {