card_scannerr 0.0.3
card_scannerr: ^0.0.3 copied to clipboard
A Flutter package to scan credit/debit card details using the camera.
π³ Card Scanner Package for Flutter A Flutter package that allows developers to scan credit/debit cards using the deviceβs camera and extract card numbers and expiry dates via Google ML Kit OCR.
π Features
π· Uses the device camera (via camera plugin) π€ Optical Character Recognition (OCR) powered by google_ml_kit π― Accurate extraction of: Card number (16 digits) Expiry date (MM/YY or MM/YYYY) π Automatically detects text and closes when valid data is found β Works on both Android & iOS π¦ Installation
Add the following to your pubspec.yaml:
dependencies: card_scannerr: git: url: https://github.com/brightroots7/card_scannerr
Then run: flutter pub get π οΈ Usage
- Import the package import 'package:card_scannerr/card_scannerr.dart';
- Launch the scanner final cardDetails = await startCardScanner(context);
if (cardDetails != null) { print('Card Number: ${cardDetails.cardNumber}'); print('Expiry Date: ${cardDetails.expiryDate}'); }
β Permissions Android (android/app/src/main/AndroidManifest.xml)