vin_decoder 0.0.1+1

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.

Usage #

A simple usage example:

import 'package:vin_decoder/vin_decoder.dart';

main() {
  VIN vin = VIN(number: 'WP0ZZZ99ZTS392124');
  
   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());
}

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.

0.0.1+1 #

  • Restrict the meta package version to 1.1.6 to match the Flutter SDK limitations.

0.0.1 #

  • Initial version

example/vin_decoder_example.dart

import 'package:vin_decoder/vin_decoder.dart';

main() {
  var vin = VIN(number: 'WP0ZZZ99ZTS392124');

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

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  vin_decoder: ^0.0.1+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:vin_decoder/vin_decoder.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
48
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Jul 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:vin_decoder/vin_decoder.dart.

Health suggestions

Fix lib/src/vin_decoder_base.dart. (-2.96 points)

Analysis of lib/src/vin_decoder_base.dart reported 6 hints, including:

line 66 col 7: DO use curly braces for all flow control structures.

line 68 col 7: DO use curly braces for all flow control structures.

line 70 col 7: DO use curly braces for all flow control structures.

line 72 col 7: DO use curly braces for all flow control structures.

line 74 col 7: DO use curly braces for all flow control structures.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
meta ^1.1.6 1.1.7
Dev dependencies
test ^1.0.0

Admin