configureVehicle method

Future<bool> configureVehicle({
  1. required String vehicleId,
  2. int vehicleType = VehicleType.car,
  3. int seats = 5,
  4. double weight = 1500.0,
  5. int maxProvision = 0,
})

Configure vehicle metadata used in speed-alert zone lookups.

  • vehicleId Unique vehicle identifier.
  • vehicleType One of the VehicleType constants.
  • seats Number of passenger seats.
  • weight Vehicle weight in kg.
  • maxProvision Optional 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;
  }
}