insurance_card_scanner

Last updated:

0 purchases

insurance_card_scanner Image
insurance_card_scanner Images
Add to Cart

Description:

insurance card scanner

Our CardScanner Flutter widget makes it easy to add insurance card scanning to any Flutter application in 5 minutes or less.
Compatibility #




Android
iOS




Support
5.0+
12.0+



#
Installation #
Add the insurance_card_scanner package to your pubspec.yaml file.
dependencies:
flutter:
sdk: flutter
insurance_card_scanner: ^1.0.1
copied to clipboard
Or, run the following command:
$ flutter pub add insurance_card_scanner
copied to clipboard
#
Usage #
Import the library widget into your project files:
import 'package:insurance_card_scanner/insurance_card_scanner.dart';
copied to clipboard
You can optionally add the API client for more custom applications.
import 'package:insurance_card_scanner/insurance_card_scanner_api.dart';
copied to clipboard
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.
#
Getting started #
Android camera permissions #
Add the following line to your AndroidManifest.xml file:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
copied to clipboard
iOS camera permissions #
Add the following lines to your Info.plist file:
<key>NSCameraUsageDescription</key>
<string>Your description of why you need access to camera</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
copied to clipboard
Sandbox API Keys #
Create a free account on the dashboard to generate a sandbox API key.
Basic examples #
CardScanner widget #
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: (card) {
print('Scan success');
},
onError: (message) {
print(message ?? 'Unknown Scan error');
},
onCancel: () {
Navigator.of(context).pop();
},
),
),
);
}
}
copied to clipboard
CardScannerModal widget #
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');
},
onError: (message) {
print(message ?? 'Scan error');
},
onCancel: () {
Navigator.of(context).pop();
},
),
),
);

copied to clipboard
Available Properties #
Both CardScanner and CardScannerModal should be passed a CardScanConfig instance with properties for server connection, callback handling and UI customization.
CardScanConfig(
// Required
sessionToken: token,
onSuccess: onSuccess,

// Recommended
onCancel: onCancel,
onError: onError,
live: live,

// Optional
backsideSupport: scanBackside,
onRetry: onRetry,
onWebViewLoadError: onWebViewLoadError,

// UI Customization
messages: messages,
messageStyle: messagesStyle,
autoSwitchActiveColor: autoSwitchActiveColor,
autoSwitchInactiveColor: autoSwitchInactiveColor,
progressBarColor: progressBarColor,
widgetBackgroundColor: widgetBackgroundColor,
)
copied to clipboard
#
Authentication #
CardScan supports authentication for two different kinds of use cases:

Server-to-server - backend systems, admin portals, etc.
End User - a patient or clinician most likely on mobile or the web.

For detailed information on authentication and generating a JSON Web Token (JWT), check out the authentication docs.
#
Official documentation #
For a complete understanding of package setup and usage, you can refer to the package docs.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.