vin_decoder 0.1.3 copy "vin_decoder: ^0.1.3" to clipboard
vin_decoder: ^0.1.3 copied to clipboard

outdated

Dart library for working with Vehicle Identification Numbers (VINs) based on ISO 3779:2009 and World Manufacturer Identifiers (WMIs) based on ISO 3780:2009, enriched by NHTSA data.

example/vin_decoder_example.dart

import 'package:vin_decoder/vin_decoder.dart';

void main() async {
  var vin = VIN(number: 'WP0ZZZ99ZTS392124', extended: true);

  print('WMI: ${vin.wmi}');
  print('VDS: ${vin.vds}');
  print('VIS: ${vin.vis}');

  print("Model year is " + vin.modelYear());
  print("Serial number is " + vin.serialNumber());
  print("Assembly plant is " + vin.assemblyPlant());
  print("Manufacturer is " + vin.getManufacturer());
  print("Year is " + vin.getYear().toString());
  print("Region is " + vin.getRegion());
  print("VIN string is " + vin.toString());

  // The following calls are to the NHTSA DB, and are carried out asynchronously
  var make = await vin.getMakeAsync();
  print("Make is ${make}");

  var model = await vin.getModelAsync();
  print("Model is ${model}");

  var type = await vin.getVehicleTypeAsync();
  print("Type is ${type}");

  var generated = VINGenerator().generate();
  print('Randomly Generated VIN is ${generated}');
}
13
likes
0
pub points
69%
popularity

Publisher

verified publisheradaptant.io

Dart library for working with Vehicle Identification Numbers (VINs) based on ISO 3779:2009 and World Manufacturer Identifiers (WMIs) based on ISO 3780:2009, enriched by NHTSA data.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

basic_utils, http, meta, random_string

More

Packages that depend on vin_decoder