eid_scanner 0.0.1 copy "eid_scanner: ^0.0.1" to clipboard
eid_scanner: ^0.0.1 copied to clipboard

A Flutter package to scan and parse Emirates ID cards.

Emirates ID Scanner #

A Flutter package for detecting and scanning Emirates ID cards using the device camera. The package utilizes Google ML Kit for text recognition and object detection to ensure accurate ID card scanning before extracting text data.

Features #

  • Real-time camera preview with ID detection
  • Automatic capture when the ID is properly positioned
  • Text recognition to extract Emirates ID details
  • Bounding box for accurate scanning
  • Lightweight and easy to integrate

Installation #

Add the package to your pubspec.yaml:

dependencies:
  eid_scanner:
    git:
      url: https://github.com/amjadHamdoun/eid_scanner.git

Then, run:

flutter pub get

Usage #

1. Import the package #

import 'package:eid_scanner/eid_scanner.dart';

2. Initialize the Camera and Scanner #

EIDScannerCamera(
  onScanned: (EmirateIdModel? idData) {
    if (idData != null) {
      print("Scanned ID Data: ${idData.toJson()}");
    }
  },
);

3. Handle the Scanned Data #

The EmirateIdModel contains extracted text data:

class EmirateIdModel {
  final String name;
  final String idNumber;
  final String dob;

  EmirateIdModel({
    required this.name,
    required this.idNumber,
    required this.dob,
  });

  Map<String, dynamic> toJson() => {
        'name': name,
        'idNumber': idNumber,
        'dob': dob,
      };
}

Permissions #

Make sure to add camera permissions to AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />

For iOS, add these to your Info.plist:

<key>NSCameraUsageDescription</key>
<string>We need camera access to scan your Emirates ID.</string>

Example App #

Check the example/ directory for a full implementation.

Contributing #

Pull requests are welcome! If you encounter any issues, please open an issue on the repository.

License #

MIT License. See LICENSE for more details.

# eid_scanner

5
likes
0
points
18
downloads

Publisher

verified publisheramjadhamdoun.com

Weekly Downloads

A Flutter package to scan and parse Emirates ID cards.

License

unknown (license)

Dependencies

camera, flutter, google_ml_kit, image, intl, path_provider

More

Packages that depend on eid_scanner