Skip to content

Scan identity documents such as South African ID Cards, ID Books and Driver's Licenses.

License

Notifications You must be signed in to change notification settings

the-mars-rover/rsa_scan

Repository files navigation

Flutter

Masterpass Example

pub issues forks stars style license


Table of Contents

About The Project

Screenshot 1 Screenshot 2 Screenshot 3

This project provides a Flutter package for scanning South African identification documents. Supported documents include:

  • South African ID Cards
  • South African ID Books
  • South African Driver's Licenses

Built With

Getting Started

Prerequisites

Since this is a Flutter package, you will need to use it from within a Flutter App. A few resources to get you started with your first Flutter project:

Installation

Add rsa_scan as a dependency in your pubspec.yaml file.

iOS

iOS 10.0 of higher is needed to use the camera plugin. If compiling for any version lower than 10.0 make sure to check the iOS version before using the camera plugin. For example, using the device_info plugin.

Also, add one row to the ios/Runner/Info.plist with the key Privacy - Camera Usage Description and a usage description. Or in text format add the key:

<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>

Android

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

Usage

The package exposes 3 functions, namely scanIdCard, scanIdBook and scanDrivers.

A simple usage example of scanIdCard:

import 'package:rsa_scan/rsa_scan.dart';

RsaIdCard idCard = await scanIdCard(context);
print(idCard.idNumber);
print(idCard.firstNames);
print(idCard.surname);
print(idCard.gender);
// See the API reference for the full set of available properties

A simple usage example of scanIdBook:

import 'package:rsa_scan/rsa_scan.dart';

RsaIdBook idBook = await scanIdBook(context);
print(idBook.idNumber);
print(idBook.birthDate);
print(idBook.gender);
print(idBook.citizenshipStatus);
// See the API reference for the full set of available properties

A simple usage example of scanDrivers:

import 'package:rsa_scan/rsa_scan.dart';

RsaDriversLicense driversLicense = await scanDrivers(context);
print(driversLicense.idNumber);
print(driversLicense.birthDate);
print(driversLicense.gender);
print(driversLicense.citizenshipStatus);
// See the API reference for the full set of available properties

For a more comprehensive example, please see the example application

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

BornIdeas - born.dev - [email protected]

Project Link: https://github.com/born-ideas/rsa_scan

Acknowledgements

About

Scan identity documents such as South African ID Cards, ID Books and Driver's Licenses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published