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>
28 lines
615 B
Dart
28 lines
615 B
Dart
import 'parada_ruta.dart';
|
|
|
|
class Ruta {
|
|
final String id;
|
|
final String nombre;
|
|
final String zona;
|
|
final List<ParadaRuta> paradas;
|
|
final DateTime fecha;
|
|
|
|
Ruta({
|
|
required this.id,
|
|
required this.nombre,
|
|
required this.zona,
|
|
required this.paradas,
|
|
required this.fecha,
|
|
});
|
|
|
|
int get visitadas => paradas.where((p) => p.estado == EstadoParada.visitado).length;
|
|
int get pendientes => paradas.where((p) => p.estado == EstadoParada.pendiente).length;
|
|
|
|
Map<String, dynamic> toMap() => {
|
|
'id': id,
|
|
'nombre': nombre,
|
|
'zona': zona,
|
|
'fecha': fecha.toIso8601String(),
|
|
};
|
|
}
|