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
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:
Add rsa_scan
as a dependency in your pubspec.yaml file.
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>
Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle
file.
minSdkVersion 21
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
See the open issues for a list of proposed features (and known issues).
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
BornIdeas - born.dev - [email protected]
Project Link: https://github.com/born-ideas/rsa_scan