license_plate_api_uk 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • new54

license_plate_api_uk #

A Dart package for looking up technical details on vehicles registered in the UK by their license plate (VRM)

license_plate_api_uk provides a simple way to find vehicle details from a license plate (registration number) of a car, motorbike, or HGV registered in the United Kingdom.

This requires a username and password, which is available for free from https://www.regcheck.org.uk

Usage #

A simple usage example:

import 'package:license_plate_api_uk/license_plate_api_uk.dart' as RegCheck;

void main(List<String> arguments) async {
  // Usage:
  // dart bin/main.dart *VRM* *USERNAME* *PASSWORD*
  // Where *VRM* is a UK vehicle registration mark (license plate)
  // *USERNAME* and *PASSWORD* are available from https://www.regcheck.org.uk
  var vehicle = await RegCheck.LicensePlateUK(arguments[0],arguments[1],arguments[2]);
  print('Description: ${vehicle['Description']}');
  print('Engine: ${vehicle['EngineSize']['CurrentTextValue']}');
  print('Fuel Type: ${vehicle['FuelType']['CurrentTextValue']}');
  print('Transmission: ${vehicle['Transmission']['CurrentTextValue']}');
  print('Image: ${vehicle['ImageUrl']}');  
  print('Body Style: ${vehicle['BodyStyle']['CurrentTextValue']}');
  print('Colour: ${vehicle['Colour']}');
  print('Registration Date: ${vehicle['RegistrationDate']}');
  print('Engine Number: ${vehicle['EngineNumber']}');
  print('VIN: ${vehicle['VehicleIdentificationNumber']}');
}

which produces the following:

Description: VAUXHALL MOKKA SE
Engine: 1364
Fuel Type: Petrol
Transmission: Automatic
Image: https://www.regcheck.org.uk/image.aspx/@VkFVWEhBTEwgTU9LS0EgU0U=
Body Style: Hatchback
Colour: BLUE
Registration Date: 01/06/2014
Engine Number: A14NET 140580075LUJ
VIN: W0LJD7E85EB690449

Features and bugs #

Please file feature requests and bugs via the website http://www.regcheck.org.uk

1.0.3 #

  • Added dartdoc comments

1.0.2 #

  • Updated Readme

1.0.1 #

  • Updated compatibility

1.0.0 #

  • Initial version, created by Stagehand

example/main.dart

import 'package:license_plate_api_uk/license_plate_api_uk.dart' as RegCheck;

void main(List<String> arguments) async {
  // Usage:
  // dart bin/main.dart *VRM* *USERNAME* *PASSWORD*
  // Where *VRM* is a UK vehicle registration mark (license plate)
  // *USERNAME* and *PASSWORD* are available from https://www.regcheck.org.uk
  var vehicle = await RegCheck.LicensePlateUK(arguments[0],arguments[1],arguments[2]);
  print('Description: ${vehicle['Description']}');
  print('Engine: ${vehicle['EngineSize']['CurrentTextValue']}');
  print('Fuel Type: ${vehicle['FuelType']['CurrentTextValue']}');
  print('Transmission: ${vehicle['Transmission']['CurrentTextValue']}');
  print('Image: ${vehicle['ImageUrl']}');  
  print('Body Style: ${vehicle['BodyStyle']['CurrentTextValue']}');
  print('Colour: ${vehicle['Colour']}');
  print('Registration Date: ${vehicle['RegistrationDate']}');
  print('Engine Number: ${vehicle['EngineNumber']}');
  print('VIN: ${vehicle['VehicleIdentificationNumber']}');
}

Use this package as a library

1. Depend on it

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


dependencies:
  license_plate_api_uk: ^1.0.3

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:license_plate_api_uk/license_plate_api_uk.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
17
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
54
Learn more about scoring.

We analyzed this package on May 23, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.1
  • pana: 0.13.8-dev

Health suggestions

Fix lib/license_plate_api_uk.dart. (-0.50 points)

Analysis of lib/license_plate_api_uk.dart reported 1 hint:

line 5 col 1: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://www.regcheck.org.uk/ was unreachable.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <3.0.0
http ^0.12.1 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12
http_parser 3.1.4
meta 1.1.8
path 1.7.0
pedantic 1.9.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6