insurance_card_scanner 1.0.0 copy "insurance_card_scanner: ^1.0.0" to clipboard
insurance_card_scanner: ^1.0.0 copied to clipboard

A library that makes it easy to add insurance card scanning and eligibility verification to any web application in 5 minutes or less.

A Flutter package to scan insurance cards.

Android iOS
Support SDK 21+ 12.0+

Features #

Adds a widget for scanning insurance cards and capture their data using the device's camera.

Getting started #

Android camera permissions #

Add the following line to your AndroidManifest.xml file:

<key>NSCameraUsageDescription</key>
<string>To scan cards please grant camera access</string>

iOS camera permissions #

Add the following lines to your Info.plist file:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />

Usage #

This package relies on the CardScan AI for scanning and capturing data from insurance cards. For complete understand of package setup and usage, you can refer to the package docs.

For a list of steps for configuring insurance card scanner, see the example app README.

CardScanner #

Use it on your custom screens like any other widget:

import 'package:insurance_card_scanner/insurance_card_scanner.dart';

class ScannerWidgetScreen extends StatelessWidget {
  const ScannerWidgetScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Scanner widget'),
      ),
      body: CardScanner(
        properties: CardScanConfig(
          sessionToken: 'pass your token here',
          onSuccess: (ScannedCard card) {
            print('Scan success');
          },
          onCardScanError: (String? message) {
            print(message ?? 'Scan error');
          },
          onWebViewLoadError: () {
            print('WebView load error');
          },
          onCardScanCancel: () {
            Navigator.of(context).pop();
          },
        ),
      ),
    );
  }
}

CardScannerModal #

Push it using Navigator to open a full-screen scanner.


Navigator.of(context).push(
  CardScanModal(
    properties: CardScanConfig(
      sessionToken: 'pass your token here',
      onSuccess: (card) {
        print('Scan success');
      },
      onCardScanError: (message) {
        print(message ?? 'Scan error');
      },
      onWebViewLoadError: () {
        print('WebView load error');
      },
      onCardScanCancel: () {
        Navigator.of(context).pop();
      },
    ),
  ),
);

1
likes
120
pub points
43%
popularity

Publisher

verified publishercardscan.ai

A library that makes it easy to add insurance card scanning and eligibility verification to any web application in 5 minutes or less.

Homepage

Documentation

Documentation
API reference

License

unknown (LICENSE)

Dependencies

flutter, flutter_inappwebview, permission_handler, pubspec_parse

More

Packages that depend on insurance_card_scanner