App Flutter 2.11 para vendedores de ruta de Telcotronics. Incluye ruta del día con mapa custom, catálogo, pedidos CRUD, firma digital, scanner QR/barcode, selector de clientes escalable, notificaciones in-app y soporte multiplataforma (Android + Linux desktop). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
81 lines
2.1 KiB
Dart
81 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../theme/app_theme.dart';
|
|
|
|
class StatCard extends StatelessWidget {
|
|
final String titulo;
|
|
final String valor;
|
|
final String subtitulo;
|
|
final IconData icono;
|
|
final Color color;
|
|
|
|
const StatCard({
|
|
Key? key,
|
|
required this.titulo,
|
|
required this.valor,
|
|
required this.subtitulo,
|
|
required this.icono,
|
|
required this.color,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
color: AppTheme.cardColor,
|
|
borderRadius: BorderRadius.circular(14),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: color.withOpacity(0.15),
|
|
blurRadius: 10,
|
|
offset: const Offset(0, 4),
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: Text(
|
|
titulo,
|
|
style: const TextStyle(
|
|
fontSize: 12,
|
|
color: AppTheme.textSecondary,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: const EdgeInsets.all(8),
|
|
decoration: BoxDecoration(
|
|
color: color.withOpacity(0.12),
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
child: Icon(icono, color: color, size: 18),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 10),
|
|
Text(
|
|
valor,
|
|
style: TextStyle(
|
|
fontSize: 22,
|
|
fontWeight: FontWeight.bold,
|
|
color: color,
|
|
),
|
|
),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
subtitulo,
|
|
style: const TextStyle(fontSize: 11, color: AppTheme.textSecondary),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|