imei_validator

Last updated:

0 purchases

imei_validator Image
imei_validator Images
Add to Cart

Description:

imei validator

imei_validator #
imei_validator is a library for checking IMEIs using the Luhn algorithm.
Installing #
Add this to your package's pubspec.yaml file:
dependencies:
imei_validator: any
copied to clipboard
If you're using the Dart Editor, choose:
Menu > Tools > Pub Install
copied to clipboard
Or if you want to install from the command line, run:
$ pub install
copied to clipboard
Now in your Dart code, you can use:
import 'package:imei_validator/imei_validator.dart';
copied to clipboard
Overview #
var imei = new ImeiValidator("378282246310005");
print(imei.isValid); // true
copied to clipboard
Note: imei_validator will automatically remove any space or dashes from the string passed to it
Check Digit #
You can calculate a check digit by creating a new ImeiValidator and passing in an meid (14 digits). The ImeiValidator will automatically calculate the check digit and make it available via the checkDigit getter.
var imei = new ImeiValidator("37828224631000");
print(imei.checkDigit); // 5
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.