configureVehicle method
Configure vehicle metadata used in speed-alert zone lookups.
vehicleIdUnique vehicle identifier.vehicleTypeOne of the VehicleType constants.seatsNumber of passenger seats.weightVehicle weight in kg.maxProvisionOptional maximum provision value.
Implementation
Future<bool> configureVehicle({
required String vehicleId,
int vehicleType = VehicleType.car,
int seats = 5,
double weight = 1500.0,
int maxProvision = 0,
}) async {
try {
final result = await _method.invokeMethod<bool>('configureVehicle', {
'vehicleId': vehicleId,
'vehicleType': vehicleType,
'seats': seats,
'weight': weight,
'maxProvision': maxProvision,
});
return result ?? false;
} on PlatformException {
rethrow;
}
}