cnic_scanner 0.0.5 copy "cnic_scanner: ^0.0.5" to clipboard
cnic_scanner: ^0.0.5 copied to clipboard

A package that lets you to scan your CNIC and ID cards and all types of other cards. It support both Android and iOS and null safe.

cnic_scanner #

A Flutter package that let's you to scan your CNIC and ID cards and all types of other cards.

Installation #

Add following dependency in pubspec.yaml file. And add this import to your file.

cnic_scanner: latest version
image_picker: latest version

import 'package:cnic_scanner/cnic_scanner.dart';

Quick Start #


// create a obj of CnicModel
CnicModel _cnicModel = CnicModel();

// then call this method fron package, our package needs you to pass ImageSource as an argument
scanImage(imageSource: imageSource) from CnicScanner class

await CnicScanner().scanImage(imageSource: imageSource);                ​

CustomDialog #


// I have created a custom dialog and passing ImageSource here in ths way. You can furture check it in example

CustomDialogBox(onCameraBTNPressed: () {
                scanCnic(ImageSource.camera);
              }, onGalleryBTNPressed: () {
                scanCnic(ImageSource.gallery);
              });                ​

CnicModel #


// this class will return these parameters.

class CardModel {
     String _cnicNumber = "";
     String _cnicIssueDate = "";
     String _cnicHolderName = "";
     String _cnicExpiryDate = "";
     String _cnicHolderDateOfBirth = "";
}

ScreenShots #

Cnic Screen Custom Dialog Scanned Cnic Data

Demo #

Scanned from Gallery Scanned from Camera

Developers #

Faiza Farooqui and Kamran Khan

License #

MIT

63
likes
140
points
69
downloads

Publisher

verified publisherfaizafarooquidev.blogspot.com

Weekly Downloads

A package that lets you to scan your CNIC and ID cards and all types of other cards. It support both Android and iOS and null safe.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, fluttertoast, google_mlkit_text_recognition, image_picker, intl, permission_handler

More

Packages that depend on cnic_scanner