rsa_identification 0.0.1+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 67

A Dart Library for decoding and providing South African identification details from documents such as Driver's licenses and Smart ID's.

Supported Documents #

  • [x] Driver's Licenses
  • [x] Smart ID Documents
  • [ ] Passports
  • [ ] Old ID Books

Usage #

A simple usage example:

import 'dart:convert';

import 'package:rsa_identification/rsa_identification.dart';

void main() {
  // These bytes would be scanned using a barcode scanner.
  var scannedBytes = utf8.encode(
      'SURNAME|NAME|GENDER|NATIONALITY|ID NUMBER|29 Jul 2000|COUNTRY OF BIRTH|CITIZENSHIP STATUS|26 Jan 2017|23370|SMART ID NUMBER|1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890');

  var idDocument = IdDocument.fromBarcodeBytes(scannedBytes);
  print('First Names: ${idDocument.firstNames}');
  print('Last Name: ${idDocument.surname}');
  print('ID Number: ${idDocument.idNumber}');
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.0.1+1 #

  • Updated example in README.md

0.0.1 #

  • Initial Release

example/rsa_identification_example.dart

import 'dart:convert';

import 'package:rsa_identification/rsa_identification.dart';

void main() {
  // These bytes would be scanned using a barcode scanner.
  var exampleSmartIdCardBytes = utf8.encode(
      'SURNAME|NAME|GENDER|NATIONALITY|ID NUMBER|29 Jul 2000|COUNTRY OF BIRTH|CITIZENSHIP STATUS|26 Jan 2017|23370|SMART ID NUMBER|1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890');

  var idDocument = IdDocument.fromBarcodeBytes(exampleSmartIdCardBytes);
  print('First Names: ${idDocument.firstNames}');
  print('Last Name: ${idDocument.surname}');
  print('ID Number: ${idDocument.idNumber}');
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Format lib/rsa_identification.dart.

Run dartfmt to format lib/rsa_identification.dart.

Format lib/src/drivers_license.dart.

Run dartfmt to format lib/src/drivers_license.dart.

Format lib/src/id_document.dart.

Run dartfmt to format lib/src/id_document.dart.

Format lib/src/smart_id.dart.

Run dartfmt to format lib/src/smart_id.dart.

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.7.0 <3.0.0
asn1lib ^0.6.0 0.6.4
Dev dependencies
pedantic ^1.8.0
test ^1.6.0