Skip to content
pubscout

flutter_credit_card_scanner

0.13.0, released 5 weeks ago by sudumtech.com

Scan and extract credit card information using the device camera and on-device machine learning.

$ flutter pub add flutter_credit_card_scanner
Source repository

What it does

Provides a camera widget that captures credit card details like the card number, cardholder name, and expiration date. It uses Google ML Kit for Android and Apple Vision for iOS to perform on-device text recognition.

AI-written summary of version 0.13.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need users to scan credit cards directly from the device camera.
  • You require on-device processing for credit card information to maintain privacy.

Skip it when

  • You only need standard barcode or QR code scanning.
  • Targeting platforms other than Android and iOS.

Strengths

  • Cross-platform support for Android and iOS using native ML features (Google ML Kit and Apple Vision).
  • Includes Luhn validation and configurable scanning options.
  • Secure on-device processing.

Weaknesses

  • Requires platform-specific configuration like camera permissions and minimum SDK versions.
  • Android integration requires Firebase and Google ML Kit setup.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
4

Add CAMERA permission to AndroidManifest.xml, set minimum SDK version to 21, and configure NSCameraUsageDescription in iOS Info.plist with a minimum deployment target of iOS 15.5.

CameraScannerWidget(
  onNoCamera: () {},
  onScan: (_, cardModel) {},
  loadingHolder: const Center(child: CircularProgressIndicator()),
)

Alternatives

Packages that do the same job and could replace flutter_credit_card_scanner.

Works with

Packages commonly used together with flutter_credit_card_scanner: ones it builds on, ones built on it, and its own family.