advanced_business_card_reader 1.1.2 copy "advanced_business_card_reader: ^1.1.2" to clipboard
advanced_business_card_reader: ^1.1.2 copied to clipboard

Business card reader with Android ML Kit OCR, iOS Apple Vision OCR, iOS 26+ arm64 simulator support, and contact field parsing.

advanced_business_card_reader #

Business/visiting card reader plugin for Flutter.

  • Native OCR with Google ML Kit Text Recognition v2 on Android
  • Native OCR with Apple Vision on iOS, including arm64 simulator builds
  • Native entity extraction for extra phone/email/url signals
  • Dart-side fallback parsing for name/company/phones/emails/websites

What changed #

This plugin now uses direct native platform APIs through a Flutter MethodChannel:

  • Channel: advanced_business_card_reader
  • Methods:
    • ocrFromFile
    • extractEntities

The public Dart API remains the same:

  • BusinessCardReader.scanFromFile(...)
  • BusinessCardReader.scanAutoFromFile(...)
  • BusinessCardScanResult / BusinessCardData
  • OcrScript values (latin, devanagari, chinese, japanese, korean)

Additive API for double-side cards:

  • BusinessCardReader.scanFromFilesFrontBack(...)
  • BusinessCardReader.scanAutoFromFilesFrontBack(...)
  • BusinessCardSidesResult (front, back, merged)

Install #

dependencies:
  advanced_business_card_reader: ^1.1.2

Platform requirements #

Android #

  • Minimum SDK: 26 (required because of ML Kit Entity Extraction)
  • ML Kit dependencies are provided by the plugin:
    • com.google.mlkit:text-recognition:16.0.1
    • com.google.mlkit:text-recognition-devanagari:16.0.1
    • com.google.mlkit:text-recognition-chinese:16.0.1
    • com.google.mlkit:text-recognition-japanese:16.0.1
    • com.google.mlkit:text-recognition-korean:16.0.1
    • com.google.mlkit:entity-extraction:16.0.0-beta6

If you want a smaller binary, you can fork and remove script-specific recognizers you do not need.

iOS #

  • iOS deployment target: 15.5
  • Supports arm64 iOS device and arm64 iOS simulator builds, including iOS 26+ simulator runtimes
  • Uses Apple system frameworks: Vision for OCR and Foundation/NSDataDetector for entity hints
  • No Google ML Kit pods are used on iOS, and no simulator architecture exclusions are set by this plugin

Entity Extraction models are downloaded on-device with downloadModelIfNeeded() before annotation on Android. iOS entity hints use NSDataDetector and do not require model downloads.

Upgrading iOS projects from 1.1.1 #

Version 1.1.2 removes all iOS Google ML Kit pods from this plugin. If your app still reports GoogleMLKit, MLImage, MLKitCommon, MLKitEntityExtraction, or MLKitVision as transitive dependencies of advanced_business_card_reader, clean the old CocoaPods lock state after updating the package:

flutter clean
flutter pub get
cd ios
rm -rf Pods Podfile.lock
pod install --repo-update
cd ..
flutter run

Usage #

import 'package:advanced_business_card_reader/advanced_business_card_reader.dart';

final result = await BusinessCardReader.scanFromFile(
  filePath,
  script: OcrScript.latin,
  defaultIsoCountry: 'IN',
);

print(result.data.name);
print(result.data.company);
print(result.data.phones);
print(result.data.emails);
print(result.data.websites);
print(result.data.rawText);

Auto script:

final result = await BusinessCardReader.scanAutoFromFile(
  filePath,
  preferredScripts: const [
    OcrScript.latin,
    OcrScript.devanagari,
    OcrScript.chinese,
    OcrScript.japanese,
    OcrScript.korean,
  ],
  defaultIsoCountry: 'IN',
);

Double-side card:

final sides = await BusinessCardReader.scanAutoFromFilesFrontBack(
  frontPath: frontImagePath,
  backPath: backImagePath,
  preferredScripts: const [
    OcrScript.latin,
    OcrScript.devanagari,
    OcrScript.chinese,
    OcrScript.japanese,
    OcrScript.korean,
  ],
  defaultIsoCountry: 'IN',
);

print('Front: ${sides.front.data.toJson()}');
print('Back: ${sides.back.data.toJson()}');
print('Merged: ${sides.merged.data.toJson()}');

Parsing behavior #

  • OCR text is always parsed by regex + phone_numbers_parser fallback.
  • Entity extraction is best-effort enhancement only.
  • phones, emails, and websites are merged as a union of:
    • parser results
    • extracted entities
  • If entity extraction fails or a model download fails, parser fallback output is still returned.

Unsupported platforms #

Web/desktop are not supported. Calls throw UnsupportedError with a clear message.

Example app #

The example app includes:

  • Camera
  • Gallery
  • File picker
  • Script selector (Auto + individual scripts)
  • Single-side and double-side scan modes

Run:

cd example
flutter run

License #

MIT

1
likes
150
points
176
downloads

Documentation

API reference

Publisher

verified publisherhsquareapps.com

Weekly Downloads

Business card reader with Android ML Kit OCR, iOS Apple Vision OCR, iOS 26+ arm64 simulator support, and contact field parsing.

Repository (GitHub)
View/report issues

Topics

#ocr #business-card #text-recognition #mlkit #scanner

License

MIT (license)

Dependencies

flutter, phone_numbers_parser

More

Packages that depend on advanced_business_card_reader

Packages that implement advanced_business_card_reader