TruckProfile constructor

TruckProfile({
  1. int height = 0,
  2. int length = 0,
  3. int width = 0,
  4. int axleLoad = 0,
  5. double maxSpeed = 0,
  6. int mass = 0,
  7. FuelType fuel = FuelType.diesel,
  8. String plateNumber = '',
})

Truck profile constructor with default diesel fuel type.

Parameters

  • height - Truck height in centimetres (default 0).
  • length - Truck length in centimetres (default 0).
  • width - Truck width in centimetres (default 0).
  • axleLoad - Axle load in kilograms (default 0).
  • maxSpeed - Maximum speed in m/s (default 0).
  • mass - Vehicle mass in kilograms (default 0).
  • fuel - Engine FuelType (default FuelType.diesel).
  • plateNumber - Registration plate number (inherited).

Implementation

TruckProfile({
  this.height = 0,
  this.length = 0,
  this.width = 0,
  this.axleLoad = 0,
  super.maxSpeed = 0,
  super.mass = 0,
  super.fuel = FuelType.diesel,
  super.plateNumber = '',
});