Overview
Viax supports multiple vehicle types to serve different transportation needs. Each vehicle type has specific requirements, pricing, and operational characteristics.
Supported Vehicle Types
Motorcycle Code: motoPurpose: Personal transport for 1 passengerLicense Required: A2 or higherBase Fare: $4,000 COP
Car Code: carroPurpose: Personal transport for up to 4 passengersLicense Required: C1 or higherBase Fare: $6,000 COP
Cargo Motorcycle Code: moto_cargaPurpose: Small package deliveryLicense Required: C1 or higherBase Fare: $5,000 COP
Cargo Van Code: carro_cargaPurpose: Large package and furniture deliveryLicense Required: C2 or higherBase Fare: $8,000 COP
Vehicle Type Entity
enum VehicleType {
moto ( 'moto' , 'Moto' , Icons .two_wheeler),
carro ( 'carro' , 'Carro' , Icons .directions_car),
motoCarga ( 'moto_carga' , 'Moto Carga' , Icons .delivery_dining),
carroCarga ( 'carro_carga' , 'Carro Carga' , Icons .local_shipping);
final String code;
final String displayName;
final IconData icon;
const VehicleType ( this .code, this .displayName, this .icon);
static VehicleType fromCode ( String code) {
return VehicleType .values. firstWhere (
(type) => type.code == code,
orElse : () => VehicleType .carro,
);
}
}
License Requirements
Colombia License Categories
Category A2
Category C1
Category C2
Vehicles: MotorcyclesEngine Size: Up to 200ccViax Vehicle Types: motoAge Requirement: 16+ years
Vehicles: Passenger cars, light trucksWeight: Up to 3,500 kgViax Vehicle Types: carro, moto_cargaAge Requirement: 18+ years
Vehicles: Medium trucks, vansWeight: 3,500 kg - 10,500 kgViax Vehicle Types: carro_cargaAge Requirement: 18+ years
License Validation
bool isLicenseValidForVehicleType ( String licenseCategory, String vehicleType) {
final validCombinations = {
'moto' : [ 'A1' , 'A2' , 'B1' , 'B2' , 'C1' , 'C2' ],
'carro' : [ 'C1' , 'C2' ],
'moto_carga' : [ 'C1' , 'C2' ],
'carro_carga' : [ 'C2' ],
};
return validCombinations[vehicleType] ? . contains (licenseCategory) ?? false ;
}
Required Fields
admin/domain/entities/vehicle.dart
class Vehicle {
final String tipo; // 'moto', 'carro', 'moto_carga', 'carro_carga'
final String placa; // License plate (e.g., 'ABC123')
final String marca; // Brand (e.g., 'Toyota', 'Yamaha')
final String modelo; // Model (e.g., 'Corolla', 'FZ')
final int anio; // Year (e.g., 2020)
final String color; // Color (e.g., 'Blanco', 'Negro')
// Validation
bool get isValid {
return placa.isNotEmpty &&
marca.isNotEmpty &&
modelo.isNotEmpty &&
anio >= 2000 && anio <= DateTime . now ().year + 1 ;
}
}
Optional Fields
class VehicleDetails extends Vehicle {
final String ? numeroMotor;
final String ? numeroChasis;
final int ? kilometraje;
final String ? transmision; // 'Manual', 'Automática'
final String ? combustible; // 'Gasolina', 'Eléctrico', 'Híbrido'
final int ? capacidadPasajeros;
final double ? capacidadCarga; // kg
}
Vehicle Database Schema
CREATE TABLE vehiculos (
id INT AUTO_INCREMENT PRIMARY KEY ,
conductor_id INT NOT NULL ,
tipo ENUM( 'moto' , 'carro' , 'moto_carga' , 'carro_carga' ) NOT NULL ,
placa VARCHAR ( 10 ) NOT NULL UNIQUE ,
marca VARCHAR ( 50 ) NOT NULL ,
modelo VARCHAR ( 50 ) NOT NULL ,
anio INT NOT NULL ,
color VARCHAR ( 30 ) NOT NULL ,
numero_motor VARCHAR ( 50 ),
numero_chasis VARCHAR ( 50 ),
kilometraje INT ,
transmision ENUM( 'Manual' , 'Automática' ),
combustible ENUM( 'Gasolina' , 'Diésel' , 'Eléctrico' , 'Híbrido' ),
capacidad_pasajeros INT ,
capacidad_carga DECIMAL ( 8 , 2 ),
activo BOOLEAN DEFAULT TRUE,
verificado BOOLEAN DEFAULT FALSE,
fecha_verificacion DATETIME ,
creado_en TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
actualizado_en TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (conductor_id) REFERENCES usuarios(id)
);
Vehicle Type Configuration
Each vehicle type has specific configuration in the pricing table:
SELECT
tipo_vehiculo,
tarifa_base,
costo_por_km,
costo_por_minuto,
tarifa_minima
FROM configuracion_precios
WHERE activo = TRUE;
Configuration by Type
Type Base Per KM Per Min Minimum moto $4,000 $2,000 $250 $6,000 carro $6,000 $3,000 $400 $9,000 moto_carga $5,000 $2,500 $300 $7,500 carro_carga $8,000 $3,500 $450 $12,000
Vehicle Selection UI
User Selection Screen
user/presentation/screens/select_destination_screen.dart
Widget _buildVehicleTypeSelector () {
return Row (
children : [
_buildVehicleTypeCard (
type : 'moto' ,
icon : Icons .two_wheeler,
label : 'Moto' ,
price : '± $ 6 ,000' ,
),
_buildVehicleTypeCard (
type : 'carro' ,
icon : Icons .directions_car,
label : 'Carro' ,
price : '± $ 9 ,000' ,
),
_buildVehicleTypeCard (
type : 'moto_carga' ,
icon : Icons .delivery_dining,
label : 'Moto Carga' ,
price : '± $ 7 ,500' ,
),
_buildVehicleTypeCard (
type : 'carro_carga' ,
icon : Icons .local_shipping,
label : 'Carro Carga' ,
price : '± $ 12 ,000' ,
),
],
);
}
Vehicle Verification Process
Driver Registration
Driver enters vehicle information during onboarding
Document Upload
Driver uploads:
Vehicle registration (Tarjeta de Propiedad)
SOAT (mandatory insurance)
Technomechanical inspection certificate
Photos of the vehicle
Admin Review
Admin verifies:
License plate matches registration
Driver’s license category is valid for vehicle type
All documents are valid and not expired
Approval
Vehicle is marked as verificado = TRUE and driver can start accepting trips
Vehicle Age Restrictions
Implement vehicle age limits:
class VehicleAgePolicy {
static const maxAgeYears = {
'moto' : 15 ,
'carro' : 15 ,
'moto_carga' : 12 ,
'carro_carga' : 12 ,
};
static bool isVehicleAgeValid ( String vehicleType, int year) {
final currentYear = DateTime . now ().year;
final vehicleAge = currentYear - year;
final maxAge = maxAgeYears[vehicleType] ?? 15 ;
return vehicleAge <= maxAge;
}
static String getAgeRejectionMessage ( String vehicleType, int year) {
final currentYear = DateTime . now ().year;
final vehicleAge = currentYear - year;
final maxAge = maxAgeYears[vehicleType] ?? 15 ;
return 'Vehículo muy antiguo ( $ vehicleAge años). '
'Máximo permitido: $ maxAge años para $ vehicleType .' ;
}
}
Vehicle Capacity
Define passenger and cargo limits:
class VehicleCapacity {
static const passengerCapacity = {
'moto' : 1 , // Driver + 1 passenger
'carro' : 4 , // Driver + 4 passengers
'moto_carga' : 0 , // No passengers, cargo only
'carro_carga' : 1 , // Driver + 1 helper
};
static const cargoCapacityKg = {
'moto' : 0.0 , // No cargo
'carro' : 50.0 , // Small luggage
'moto_carga' : 150.0 , // Medium packages
'carro_carga' : 1000.0 , // Large cargo
};
}
Vehicle Icons and Colors
Consistent UI representation:
class VehicleTypeTheme {
static const colors = {
'moto' : Color ( 0xFF667eea ),
'carro' : Color ( 0xFF11998e ),
'moto_carga' : Color ( 0xFFffa726 ),
'carro_carga' : Color ( 0xFFf5576c ),
};
static const icons = {
'moto' : Icons .two_wheeler,
'carro' : Icons .directions_car,
'moto_carga' : Icons .delivery_dining,
'carro_carga' : Icons .local_shipping,
};
static Color getColor ( String vehicleType) {
return colors[vehicleType] ?? Colors .grey;
}
static IconData getIcon ( String vehicleType) {
return icons[vehicleType] ?? Icons .help_outline;
}
}
Adding New Vehicle Types
Adding new vehicle types requires updates to multiple system components.
Update Database
ALTER TABLE vehiculos
MODIFY tipo ENUM( 'moto' , 'carro' , 'moto_carga' , 'carro_carga' , 'new_type' );
Add Pricing Configuration
INSERT INTO configuracion_precios (
tipo_vehiculo, tarifa_base, costo_por_km, costo_por_minuto, tarifa_minima
) VALUES ( 'new_type' , 10000 , 4000 , 500 , 15000 );
Update Flutter Enums
Add new type to VehicleType enum and related constants
Update UI Components
Add icon, color, and labels for new vehicle type
Test Thoroughly
Verify pricing, validation, and UI for new type
Vehicle Type Statistics
Track usage by vehicle type:
class VehicleTypeStats {
final String tipo;
final int totalVehicles;
final int activeVehicles;
final int totalTrips;
final double averageRating;
final double totalEarnings;
double get utilizationRate {
return totalVehicles > 0
? (activeVehicles / totalVehicles) * 100
: 0 ;
}
}
Popular Vehicle Brands
Motorcycles
Yamaha (FZ, MT-03)
Honda (CB, CBR)
Suzuki (GN, GSX)
Bajaj (Pulsar, Dominar)
Cars
Chevrolet (Spark, Sail)
Renault (Logan, Sandero)
Mazda (2, 3)
Toyota (Corolla, Yaris)
Cargo Vehicles
Chevrolet (N300, N200)
Renault (Master, Kangoo)
Fiat (Ducato)
Ford (Transit)
Best Practices
Verify Documents Carefully
Always cross-check license plate, registration, and SOAT to prevent fraud.
Enforce age restrictions to maintain service quality and safety.
Monitor which vehicle types are most in demand to guide driver recruitment.
Adjust pricing for each vehicle type based on operating costs and demand.
Maintain balanced availability of all vehicle types to serve diverse customer needs.
Pricing Configuration Set pricing by vehicle type
Driver Management Verify driver vehicle documents
Trip Monitoring Track trips by vehicle type