license_plate_api_sri_lanka 1.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 49

license_plate_api_sri_lanka #

A Dart package for looking up technical details on vehicles registered in sri lanka by their license plate

license_plate_api_sri_lanka provides a simple way to find vehicle details from a license plate (registration number) of a car registered in sri lanka

This requires a username and password, which is available for free from http://lk.carregistrationapi.com/

Usage #

A simple usage example:

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

void main(List<String> arguments) async {
  // Usage:
  // dart bin/main.dart *REGISTRATION* *USERNAME* *PASSWORD*
  // *USERNAME* and *PASSWORD* are available from http://lk.carregistrationapi.com/
  var vehicle = await RegCheck.LicensePlate(arguments[0],arguments[1],arguments[2]);
  print('Description: ${vehicle['Description']}');
 
}

which produces the following:

Description: OPEL MOKKA SE

Features and bugs #

Please file feature requests and bugs via the website http://lk.carregistrationapi.com/

1.0.4 #

  • Mistake in example

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_sri_lanka/license_plate_api_sri_lanka.dart' as RegCheck;

void main(List<String> arguments) async {

  var vehicle = await RegCheck.LicensePlate(arguments[0],arguments[1],arguments[2]);
  print('Description: ${vehicle['Description']}');

}

Use this package as a library

1. Depend on it

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


dependencies:
  license_plate_api_sri_lanka: ^1.0.4

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_sri_lanka/license_plate_api_sri_lanka.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
7
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]
49
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14

Health suggestions

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

Analysis of lib/license_plate_api_sri_lanka.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 http://lk.carregistrationapi.com/ 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.13 1.15.0-nullsafety
http_parser 3.1.4
meta 1.2.2 1.3.0-nullsafety
path 1.7.0
pedantic 1.9.2
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety