CarProfile constructor

CarProfile({
  1. int mass = 0,
  2. FuelType fuel = FuelType.petrol,
  3. double maxSpeed = 0.0,
})

Car profile constructor with predefined FuelType.petrol as fuel type.

Parameters

  • IN mass Mass in kg.
  • IN fuel Fuel type.
  • IN maxSpeed Max speed in m/s.

Implementation

CarProfile({
  super.mass = 0,
  super.fuel = FuelType.petrol,
  super.maxSpeed = 0.0,
});