import 'package:latlong2/latlong.dart'; class RoutePosition { final int positionId; final double lat; final double lng; final int speed; final String timestamp; RoutePosition({required this.positionId, required this.lat, required this.lng, required this.speed, required this.timestamp}); LatLng get latLng => LatLng(lat, lng); } class RouteModel { final String routeId; final String name; final int truckId; String status; final List positions; final String turno; RouteModel({required this.routeId, required this.name, required this.truckId, required this.status, required this.positions, this.turno = 'MATUTINO'}); List get polylinePoints => positions.map((p) => LatLng(p.lat, p.lng)).toList(); } class ColonyModel { final String colonia; final String routeId; final String horarioEstimado; ColonyModel({required this.colonia, required this.routeId, required this.horarioEstimado}); }