nateshmbhat / card-scanner-flutter

A flutter package for Fast, Accurate and Secure Credit card & Debit card scanning
https://pub.dev/packages/card_scanner
GNU General Public License v3.0
114 stars 107 forks source link
ai card-scanner card-scanner-library card-scanning credit-card credit-card-scaning dart debit-card flutter image-processing image-re image-to-text ml

Fast, Accurate and Secure Credit & Debit card scanner for Flutter

card_scanner is a flutter plugin for accurately and quickly scanning debit and credit cards.

Features

Get Demo App Here :

Vision App

Install

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

dependencies:
  card_scanner: <latest-version>

get the latest version number here

Usage

Just import the package and call scanCard:

import 'package:card_scanner/card_scanner.dart';
var cardDetails = await CardScanner.scanCard();

print(cardDetails);

Example Output:

Card Number = 5173949117389006
Expiry Date = 11/26

The above code opens the device camera, looks for a valid card and gets the required details and returns the CardDetails object.


Scan Options

If you wish to obtain the card holder name and card issuer, you can specify the options:

import 'package:card_scanner/card_scanner.dart';
var cardDetails = await CardScanner.scanCard(
    scanOptions: CardScanOptions(
        scanCardHolderName: true,
        scanCardIssuer: true,
    ),
);

print(cardDetails);

Example Output :

Card Number = 5173949117389006
Expiry Date = 11/26
Card Issuer = mastercard
Card Holder Name = PAUL SAMUELSON

iOS Requirements

Documentation & Samples 📖