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

outdated

A simple Dart library for decoding and validating Vehicle Identification Numbers (VINs) based on ISO 3779:2009 and World Manufacturer Identifiers (WMIs) based on ISO 3780:2009. Further enriched by dat [...]

vin-decoder-dart #

Build Status Pub

A VIN decoding and validation library for Dart.

vin_decoder provides a simple decoding and validation library for Vehicle Identification Numbers (VINs) based on ISO 3779:2009 and World Manufacturer Identifiers (WMIs) based on ISO 3780:2009.

The decoder can be used standalone in an offline mode (the default behaviour, as per earlier versions of the API), or can be further enriched by querying additional VIN information from the NHTSA Vehicle API, such as the precise make, model, and vehicle type in extended mode.

Usage #

A simple usage example:

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}");
}

which produces the following:

WMI: WP0
VDS: ZZZ99Z
VIS: TS392124
Model year is T
Serial number is 92124
Assembly plant is S
Manufacturer is Porsche
Year is 1996
Region is EU
VIN string is WP0ZZZ99ZTS392124
Make is Porsche
Model is 911
Type is Passenger Car

Features and bugs #

Please file feature requests and bugs at the issue tracker.

License #

Licensed under the terms of the Apache 2.0 license, the full version of which can be found in the LICENSE file included in the distribution.

13
likes
0
pub points
70%
popularity

Publisher

verified publisheradaptant.io

A simple Dart library for decoding and validating Vehicle Identification Numbers (VINs) based on ISO 3779:2009 and World Manufacturer Identifiers (WMIs) based on ISO 3780:2009. Further enriched by data obtained from the NHTSA database.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

basic_utils, http, meta

More

Packages that depend on vin_decoder