vehicleRegistrationCode method

String vehicleRegistrationCode({
  1. Locale? locale,
})

Returns vehicle registration code.

locale is optional Locale.

Example:

Transport().vehicleRegistrationCode(); // "TO"
Transport().vehicleRegistrationCode(locale: Locale.en); // "USA"

Implementation

String vehicleRegistrationCode({Locale? locale}) {
  if (locale == null) {
    final data = IntTransportData.vrCodes;
    return data[Random(seed).integer(max: data.length - 1)];
  } else {
    return IntTransportData.vrcByLocale(locale: locale);
  }
}