colorYearMakeModel method

String colorYearMakeModel()

Generates a random vehicle's year, make, and model with a prefixed color.

Example:

  faker.vehicle.colorYearMakeModel();

Implementation

String colorYearMakeModel() {
  VehicleYMM vehicle = random.element(vehicles);
  String color = random.element(commonColors);
  return '$color ${vehicle.year.toString()} ${vehicle.make} ${vehicle.model}';
}