quickcapture 2.0.0
quickcapture: ^2.0.0 copied to clipboard
QuickCapture - Ai Based Mobile Document Scanning,compression & imaging plugin for Flutter From Extrieve.
QuickCapture Mobile Document Scanning & Imaging #
Extrieve Technologies - Your Expert in Document Management & AI Solutions
The Quickcapture Flutter plugin enables document scanning & imaging using mobile devices. It can integrates seamlessly with mobile applications, providing high-quality document capture, compression, optimization, and conversion into PDF and TIFF formats.
Key Features #
- High-Quality Capture: Optimized focus control for document scanning.
- Ai Based auto detection & rotation: intelligent Ai Based auto detection & rotation.
- Compression & Optimization: Generate small, high-quality outputs for fast uploads.
- DPI and Layout Control: Adjust DPI, layouts, and output sizes for PDF/TIFF.
- Multi-Format Output: Supports output in both PDF and TIFF format output build.
- Developer-Friendly: Easy integration into your Flutter applications.
Note: It's not "just" a scanning SDK. It's a document scanning SDK built with Best Quality, Highest Possible Compression, and Image Optimization on in mind that works fully offline & on device.
Compatibility #
- Java: Requires Java 17 or later.
- Android:
- Minimum SDK: API 21
- Target SDK: API 36
- Compiled SDK: API 34
- iOS:
- Requires iOS 13 or later.
- Requires Flutter 3.24 or later, with Swift Package Manager enabled — see iOS setup.
- The SDK is downloaded as a prebuilt binary rather than bundled in the plugin, so a simulator build is available (Intel slice; see the note in iOS setup).
- Apple's simulator does not support camera functionality, so document capture itself can only be tested on a real device.
- Web: imaging only (build PDF/TIFF, JPEG compression, image info) — see Web.
Run time requirement #
- ✅ This plugin is designed to run on officially supported Android & iOS devices only.
- ✅ On Android, Google Play Services is mandatory.
- ✅ Supported CPU architectures: arm64-v8a and armeabi-v7a.
- ✅ Simulator and emulator environments are not supported.For testing on simulators, please contact the development support team to request a dedicated test version compatible with those environments.
iOS setup #
The iOS side of this plugin is a Swift package, so Swift Package Manager has to be enabled in your project. It is not available through CocoaPods.
flutter config --enable-swift-package-manager
flutter clean
flutter run
Flutter adds the package to your Xcode project for you, and the QuickCapture SDK is downloaded as a prebuilt binary. Nothing else to configure, and no Podfile changes.
Requires Flutter 3.24 or later. If Swift Package Manager is not enabled, the build stops with:
Plugin quickcapture is only Swift Package Manager compatible. Try enabling Swift
Package Manager by running "flutter config --enable-swift-package-manager"
Running on a simulator on an Apple Silicon Mac: the SDK's simulator build is Intel (x86_64) only. Open
ios/Runner.xcodeproj, select the Runner target, and set Excluded Architectures toarm64for Any iOS Simulator SDK; or run Xcode under Rosetta. Real devices need no change.
Web #
On web the plugin runs on the WebAssembly SDK, which is bundled with the plugin; nothing needs to be added to your app's web/ folder. The web SDK is an imaging library: it has no camera, so the capture features are not available in a browser.
Which methods each platform supports is shown in the Method Summary. On web, a method marked — fails with a PlatformException with code UNSUPPORTED_ON_WEB.
Files are URLs, not paths. Browsers have no file system, so:
- Inputs are URLs the browser can fetch: the
blob:URLsimage_pickerreturns on web (XFile.path),data:URLs, or same-originhttp(s):URLs. - Outputs are
blob:URLs, returned where Android and iOS return a file path. Show one withImage.network(url), or open/download it withurl_launcher. They live until the page is closed.
License. Pass the web license with the others:
await _quickcapturePlugin.initialize();
await _quickcapturePlugin.activateLicense(android: androidLicense, ios: iosLicense, web: webLicense);
Call activateLicense before the first imaging call: the web SDK takes its license once, when it first initialises, and a different license only applies after the page reloads. Without a valid license every output is watermarked; the call itself still returns true, because the web SDK cannot report whether a license was accepted.
Config on web. DPI, image quality, layouts A0–A6, CUSTOM (with setCustomLayout) and colour mode (grayScale gives grayscale output) apply. Layouts A7 and PHOTO have no web equivalent and keep the previous layout. The capture-only settings (flash, camera toggle, crop filter, …) have no effect.
Web-only methods. These use features of the web SDK that Android and iOS do not have; on Android and iOS they fail with PlatformException code UNSUPPORTED_ON_PLATFORM. On web, a failure is a PlatformException carrying the SDK's error description.
| Method | Returns |
|---|---|
getSdkInfo() |
JSON string: {"MODULE": "ImageWizHelper", "UPDATEDON": "", "VERSION": "7.0.3"} |
setOutputFilter(OutputFilter filter) |
true when applied. normal, blackAndWhite or grayscale, applied to every PDF, TIFF and JPEG page written afterwards. Takes precedence over config.capture.colorMode. |
readImageInfo on web returns the same JSON as Android and iOS.
Hosting notes
- Serve the app over HTTP(S) and serve
.wasmfiles asapplication/wasm.flutter run -d chromeandflutter build weboutput already do. - The SDK runs in a pool of 10 Web Workers, each with its own WebAssembly instance, so processing does not freeze the UI. The pool starts on
initialize()and takes a few seconds the first time. - If your site sets a Content Security Policy, allow
'wasm-unsafe-eval'inscript-src, and allow workers from your own origin (worker-src 'self'). - The SDK files add about 6 MB to the plugin. Flutter bundles a plugin's assets on every platform, so Android and iOS builds also carry them.
Other Available Platform Options #
API Methods #
1. activateLicense #
Activates the license for the Quickcapture plugin.
Future<bool?> activateLicense(String,String);
Example
bool? response = await _quickcapturePlugin.activateLicense(
android: androidLicense,
ios: iosLicense,
);
// Parameters
// - `android`: License string for Android.
// - `ios`: License string for iOS.
// Return Value
// - `true` if the license was successfully activated.
// - `false` or `null` otherwise.
2. initialize #
Initializes the Quickcapture plugin.
This must be called after activating the license and before using any other plugin methods.
Future<String?> initialize();
Example
@override
void initState() {
super.initState();
//Activate License
bool? response = await _quickcapturePlugin.activateLicense(
android: androidLicense,
ios: iosLicense,
);
print('License activation status: $response');
// Initialize the plugin
await _quickcapturePlugin.initialize();
}
Important
The execution order must be maintained:
- activateLicense()
- initialize()
initialize() must always be called after activateLicense().
If initialize() runs before license activation completes, the SDK may fail to start or behave unexpectedly.
3. startCapture #
Starts the document capture process and returns the details of the captured images.
Future<String?> startCapture();
Example
Future<void> startCapture() async {
String? response = await _quickCapturePlugin.startCapture();
if (response != null) {
Map<String, dynamic> jsonResponse = jsonDecode(response);
List<String> capturedImages = List<String>.from(jsonResponse['fileCollection']);
print("Captured Images: $capturedImages");
} else {
print("Capture failed or cancelled.");
}
}
4. startImageAttach #
Starts the document capture using images from gallery or any other source and returns the details of the captured images.
Note: This approach allows users to attach images from any source and refine them using SDK features such as filters and manual/auto cropping , document auto/manual -rotation correction before saving.
Future<String?> startImageAttach(String imagePath);
Example
Future<void> startCapture() async {
String? response = await _quickCapturePlugin.startImageAttach(String imagePath);
if (response != null) {
Map<String, dynamic> jsonResponse = jsonDecode(response);
List<String> capturedImages = List<String>.from(jsonResponse['fileCollection']);
print("Captured Images: $capturedImages");
} else {
print("Capture failed or cancelled.");
}
}
5. assetCapture #
Captures an asset (equipment, a vehicle, a nameplate, a site condition) rather than a document, and returns the details of the captured images. The photo is saved as shot, with no edge detection, cropping or filters. The saved image follows how the device was held, so a landscape shot comes out landscape, and the review screen shows a rotate button for manual correction. All the settings in config apply, as for document capture.
Future<String?> assetCapture();
Example #
Future<void> assetCapture() async {
String? response = await _quickcapturePlugin.assetCapture();
if (response != null) {
Map<String, dynamic> jsonResponse = jsonDecode(response);
List<String> capturedImages = List<String>.from(jsonResponse['fileCollection']);
print("Captured Images: $capturedImages");
} else {
print("Capture failed or cancelled.");
}
}
6. signatureCapture #
Launches the dedicated signature capture screen (guide box on the live preview, manual crop on review) and returns the captured image details.
Future<String?> signatureCapture();
Example
Future<void> captureSignature() async {
String? response = await _quickcapturePlugin.signatureCapture();
if (response != null) {
Map<String, dynamic> jsonResponse = jsonDecode(response);
if (jsonResponse['fileCollection'] != null) {
List<String> images = List<String>.from(jsonResponse['fileCollection']);
print("Signature captured: $images");
} else {
print("Signature capture failed: ${jsonResponse['DESCRIPTION']}");
}
}
}
Output — by default a signature is saved as a 150 DPI, 560×200 px (2.8:1) strip, matching the guide box. To use a different size, set a custom page layout via setCustomLayout(...) before launching signatureCapture().
Notes
signatureCapture()forcesDocumentCropping = ManualCropfor the session and restores your previous value when it finishes, so a later document capture is never left stuck on ManualCrop.- The review screen's filter tray includes an Ink filter, tuned for signatures — it normalises illumination and renders clean, legible strokes on a pure-white background (better than the high-contrast B&W filters on faint pen strokes). It's available in every review tray, and you can make it the default:
captureConfig.cropFilter = CropFilter.ink;
7. humanFaceCapture #
Launches the dedicated human face capture screen and returns the captured face image details.
Future<String?> humanFaceCapture();
Example
Future<void> captureFace() async {
String? response = await _quickcapturePlugin.humanFaceCapture();
if (response != null) {
Map<String, dynamic> jsonResponse = jsonDecode(response);
if (jsonResponse['fileCollection'] != null) {
List<String> images = List<String>.from(jsonResponse['fileCollection']);
print("Face captured: $images");
} else {
print("Face capture failed: ${jsonResponse['DESCRIPTION']}");
}
}
}
Response (both methods)
// On success
{ "fileCollection": ["/path/to/captured.jpg"] }
// On failure / cancel
{ "STATUS": "FAILURE", "DESCRIPTION": "Reason for failure" }
8. buildPDFForLastCapture #
Generates a PDF file from the images captured in the last session.
Future<String?> buildPDFForLastCapture();
Example
Future<void> buildPDF() async {
String? pdfFilePath = await _quickCapturePlugin.buildPDFForLastCapture();
if (pdfFilePath != null) {
print("PDF generated at: $pdfFilePath");
} else {
print("Failed to generate PDF.");
}
}
9. buildTIFFForLastCapture #
Generates a TIFF file from the images captured in the last session.
Future<String?> buildTIFFForLastCapture();
Example
Future<void> buildTIFF() async {
String? tiffPath = await _quickCapturePlugin.buildTIFFForLastCapture();
if (tiffPath != null) {
print("TIFF generated at: $tiffPath");
} else {
print("Failed to generate TIFF.");
}
}
10. compressToJPEG #
Generates an optimized and compressed output image path in JPEG format.
Future<String?> compressToJPEG(String imagePath);
Example
Future<void> compressImage() async {
String imagePath = "path/to/image.jpg";
String? compressedImagePath = await _quickCapturePlugin.compressToJPEG(imagePath);
if (compressedImagePath != null) {
print("Compressed image at: $compressedImagePath");
} else {
print("Failed to compress image.");
}
}
11. setCustomLayout #
Customizes layout dimensions, such as setting specific dimensions like 200x300 pixels, which can impact the quality of the output image.
Future<bool?> setCustomLayout(int customWidth, int customHeight);
Example
bool? isCustomLayoutSet = await _quickCapturePlugin.setCustomLayout(500, 900); // in pixels
if (isCustomLayoutSet == true) {
print("Custom layout set successfully.");
}
12. buildPDF #
Create a compressed & optimised single PDF output file by merging provided collection of input images.
Future<String?> buildPDF(List<String> imagePaths);
Example
// Extract paths of selected images
final List<String> imagePaths = "<image path list>";
// Pass the image paths to the buildPDF function
final String? jsonResponse = await _quickcapturePlugin.buildPDF(imagePaths);
Response:
//On Success:
{
"status": true,
"description": "PDF created successfully",
"filePath": "/path/to/generated.pdf"
}
// On Failure :
{
"status": false,
"description": "No images provided",
"filePath": null
}
13. buildTiff #
Create a compressed & optimised single TIFF output file by merging provided collection of input images.
Future<String?> buildTiff(List<String> imagePaths);
Example
// Extract paths of selected images
final List<String> imagePaths = "<image path list>";
// Pass the image paths to the buildPDF function
final String? jsonResponse = await _quickcapturePlugin.buildTiff(imagePaths);
Response:
//On Success:
{
"status": true,
"description": "TIFF created successfully",
"filePath": "/path/to/generated.tiff"
}
// On Failure :
{
"status": false,
"description": "No images provided",
"filePath": null
}
14. readImageInfo #
Gets metadata from an image file such as height, width, color type, and page count.
Supported image formats:
- TIFF
- JPEG / JPG
- PNG
- BMP
Future<String?> readImageInfo(String imagePath)
Example #
try{
String? jsonResponse = await _quickcapturePlugin.readImageInfo(fullFilePath);
}catch(e){
print("Error reading image info: ${e.toString()}")
}
Response: #
// on success
{
"FILESIZE": 146 KB,
"TOTAL_PAGES": 1,
"INFORMATION": [
{
"PAGENO": 1,
"WIDTH": 475,
"HEIGHT": 307,
"COLOR_TYPE": "GREY"
}
]
}
// on failure
{
"STATUS": false,
"ERROR_MESSAGE": "Reason for failure"
}
Field Description #
| Field | Description |
|---|---|
| FILESIZE | Total size of the image file in KB |
| TOTAL_PAGES | Number of pages (TIFF may contain multiple; JPG/PNG = 1) |
| PAGE_NO | Current page number in the image |
| WIDTH | Width of the image in pixels |
| HEIGHT | Height of the image in pixels |
| COLOR_TYPE | Image color type: COLOR, GREY, or BW |
15. startOpticalCodeCapture #
Captures an optical code (QR code or barcode) using the device camera. Returns the scanned result as a string.
Future<String?> startOpticalCodeCapture()
Example #
String scannedRes = await _quickcapturePlugin.startOpticalCodeCapture();
16. generateQRCode #
Generates a QR code from provided data.Need to provide a data in string.It return the Base64 data of the generated QR code images.
Future<String?> generateQRCode(String data)
Example #
String? base64Data = await _quickcapturePlugin.generateQRCode(Data);
17. generateBARCode #
Generates a BAR code from provided data.Needs to provide a data in string and also can specify if the BARcode with text needed.It returns the Base64 data of the generated BAR code image.
Future<String?> generateBARCode(String data,bool includeText)
Example #
String? base64Data = await _quickcapturePlugin.generateBARCode(Data,true);
18. getDeviceInfo: #
Get detailed device specifications.
Future<String?> getDeviceInfo()
Example #
try{
String? response = await _quickcapturePlugin.getDeviceInfo();
print(response)
} catch (e) {
print( "Error getting device info: ${e.toString()}");
}
This function returns a String containing JSON : #
Response
{
"manufacturer": "Xiaomi",
"model": "M2101K6I",
"os_release": "13",
"sdk_int": 33,
"cpu_hardware": "qcom",
"ram_total_mb": 5569,
"free_storage_gb": 6,
"battery_pct": 73,
"battery_is_charging": true,
"screen_density_dpi": 440
}
The returned JSON contains basic device, OS, hardware, memory, storage, battery, and screen information
Note
- iOS limitation: Battery percentage reported on iOS may not always be fully precise due to system-level restrictions and optimizations imposed by the OS.
19. getLocationInfo: #
Retrieves the location details of the current device.
Future<String?> getLocationInfo()
Example #
try{
String? response = await _quickcapturePlugin.getLocationInfo();
print(response)
} catch (e) {
print("Error getting location info: ${e.toString()}");
}
This function returns a String containing JSON :
Response
{
"DigiPIN": "2TF-J95-MTML",
"Postal Code": "711106",
"Latitude": 22.58301529,
"Longitude": 88.34189296,
"Accuracy (m)": 154.37572
}
The returned JSON contains the DigiPIN, postal code, latitude, longitude, and location accuracy in meters for the current device location.
20. getCurrentDigiPin #
Retrieves the current DigiPIN.
Future<String?> getCurrentDigiPin()
Example #
try{
String? response = await _quickcapturePlugin.getCurrentDigiPin();
print("Current DigiPin: $response");
} catch (e) {
print("Error getting DigiPin: ${e.toString()}");
}
This function returns a string that contains the current DigiPIN.
21. getSecurityInfo: #
Retrieve the current device security status.
Future<String?> getSecurityInfo()
Example #
try{
String? response = await _quickcapturePlugin.getSecurityInfo();
print(response)
} catch (e) {
print("Error getting security info: ${e.toString()}")
}
This Function returns a String containing JSON: #
Response #
{
"isRooted": false,
"isEmulator": false,
"isDevOptionsEnabled": true,
"isAdbEnabled": true,
"isVpnActive": false,
"isLocationSpoofed": false,
"locationSpoofedMessage": "Authentic"
}
Field Description
| Field | Description |
|---|---|
| isRooted | Indicates whether the device is rooted. |
| isEmulator | Indicates whether the app is running on an emulator/simulator. |
| isDevOptionsEnabled | Indicates whether developer options are enabled on the device. |
| isAdbEnabled | : Indicates whether ADB (Android Debug Bridge) is enabled. |
| isVpnActive | Indicates whether a VPN connection is currently active. |
| isLocationSpoofed | Indicates whether the device location appears to be spoofed or mocked. |
| locationSpoofedMessage | message describing the location authenticity status like Mock Provider Detected and Authentic . |
| isDebuggerAttached | (iOS only) Indicates whether a debugger is attached to the app. |
iOS:
isRootedreports whether the device is jailbroken, andisEmulatorwhether the app runs on the Simulator.isDevOptionsEnabledandisAdbEnabledarenull, since iOS has no equivalent check. The location spoofing check needs location permission (NSLocationWhenInUseUsageDescriptioninInfo.plist) and iOS 15 or later; otherwiseisLocationSpoofedisfalseandlocationSpoofedMessagegives the reason.
22. enableScreenProtection #
Enable screen protection to prevent users from taking screenshots or recording the screen while the application is in use.
Future<void> enableScreenProtection()
Example #
await _quickcapturePlugin.enableScreenProtection();
23. disableScreenProtection #
Disable screen protection and allow users to take screenshots and screen recordings.
Future<void> disableScreenProtection()
Example #
await _quickcapturePlugin.disableScreenProtection();
24. startDeviceMonitoring #
To start live device security monitoring. Security events detected while monitoring is running are delivered on the deviceThreatEvents stream.
Future<void> startDeviceMonitoring()
Stream<Map<String, dynamic>> get deviceThreatEvents
Subscribe before calling startDeviceMonitoring(): events raised while nothing is listening are dropped.
Example #
StreamSubscription<Map<String, dynamic>>? _threatSubscription;
@override
void initState() {
super.initState();
_threatSubscription = _quickcapturePlugin.deviceThreatEvents.listen(
(event) {
print('Security threat: ${event["threatType"]} - ${event["message"]}');
},
onError: (error) {
print('Device monitoring error: $error');
},
);
}
// Later, for example from a switch:
await _quickcapturePlugin.startDeviceMonitoring();
@override
void dispose() {
_threatSubscription?.cancel();
_quickcapturePlugin.stopDeviceMonitoring();
super.dispose();
}
The stream is backed by the
quickcapture/threat_eventsEventChannel. Only one listener on that channel is active at a time, so an app that still subscribes to the channel directly stops receiving events oncedeviceThreatEventsis also listened to. UsedeviceThreatEventsonly.
Event Payload
Each event emitted from the SDK contains:
{
"threatType": "VPN_ACTIVATED",
"message": "VPN connection detected"
}
| Field | Description |
|---|---|
| threatType | Type of security threat detected. Android: DEV_OPTIONS_ENABLED, VPN_ACTIVATED. iOS: VPN_ACTIVATED, SCREEN_CAPTURE_STARTED, SCREENSHOT_TAKEN. |
| message | Human-readable description of the detected security event. |
Notes
- Device monitoring begins after
startDeviceMonitoring()is called. - Multiple security events may be emitted while monitoring is active.
- Always cancel the subscription in
dispose()to prevent memory leaks.
25. stopDeviceMonitoring #
Stop the live device security monitoring.
Future<void> stopDeviceMonitoring()
Example #
await _quickcapturePlugin.stopDeviceMonitoring();
HumanFaceHelper #
The QuickCapture plugin provides an advanced option to detect and match human faces in images. Below is an overview of these methods with detailed explanations.
API Methods #
1. initHumanFaceHelper #
Initializes the Human Face Helper module required for face detection and matching. An active license should needed for this.
Future<bool?> initHumanFaceHelper()
Example
bool? initialized = await _quickcapturePlugin.initHumanFaceHelper();
if (initialized == true) {
print("Human Face Helper initialized successfully.");
} else {
print("Failed to initialize Human Face Helper.");
}
// Returns :
// true: Initialization successful.
// false: Initialization failed.
2. detectHumanFaces #
Detects human faces in the specified image and provides bounding box coordinates for each detected face.
Future<String?> detectHumanFaces(String imagePath)
Example
String? response = await _quickcapturePlugin.detectHumanFaces(imagePath);
if (response != null) {
Map<String, dynamic> result = jsonDecode(response);
if (result["STATUS"] == true) {
print("Faces detected: ${result["DATA"]}");
} else {
print("Face detection failed: ${result["DESCRIPTION"]}");
}
}
Response:
{
"STATUS": true,
"DESCRIPTION": "SUCCESS",
"CODE": 0,
"IDENTIFIER": 12456, //Unique Document ID of the image.
"DATA": [
{
"INDEX": 1, //The Face index of the first detected face in the current document : 12456
"LEFT": 2517,
"RIGHT": 3963,
"TOP": 1187,
"BOTTOM": 2538
},
{
"INDEX": 2,//The Face index of the second detected face in the current document : 12456
"LEFT": 277,
"RIGHT": 2963,
"TOP": 187,
"BOTTOM": 538
}
]
}
3. matchHumanFaces #
Compares two detected faces and determines their similarity.
Future<String?> matchHumanFaces(
{required int firstDocumentID,
required int firstDocumentFaceIndex,
required int secondDocumentID,
required int secondDocumentFaceIndex})
//firstDocumentID: Document ID of the first image.
//firstDocumentFaceIndex: Face index of the first face.
//secondDocumentID: Document ID of the second image.
//secondDocumentFaceIndex: Face index of the second face.
Example
String? matchResponse = await _quickcapturePlugin.matchHumanFaces(
firstDocumentID,
firstDocumentFaceIndex,
secondDocumentID,
secondDocumentFaceIndex,
);
print("Match result: $matchResponse");
Response:
//On success
{
"STATUS": true,
"ACCURACY": 85,
"DESCRIPTION": "<Standard explanation for match>"
}
// On failure
{
"STATUS": false,
"ACCURACY": null,
"DESCRIPTION": "<Technical reason for failure>"
}
Face Match Accuracy Interpretation #
The match level is determined based on the accuracy percentage, which reflects the similarity between two facial images. The table below provides detailed descriptions for each match level.
| Match Percentage | Match Level | Description |
|---|---|---|
| 90% - 100% | ✅ Highly Reliable Match | Faces match with extremely high confidence. They are almost certainly the same person. Suitable for critical identification applications. |
| 75% - 89% | ✅ Strong Match | Faces matched successfully with a high probability of being the same person. Reliable for most identity verification use cases. |
| 65% - 74% | ⚠️ Moderate Match | Faces show good similarity, but further validation may be required. Manual verification is recommended before confirmation. |
| 50% - 64% | ⚠️ Low Confidence Match | Faces have some resemblance, but the similarity is not strong enough to confirm identity. Additional verification is needed. |
| 0% - 49% | ❌ No Match | Faces do not match. There is minimal similarity, and they are highly unlikely to be the same person. |
Usage of Results #
✅ Highly Reliable Match (90% - 100%)
- Best for: Secure identity verification, biometric authentication, and critical decision-making.
- Action: Automatic acceptance. No further review required.
✅ Strong Match (75% - 89%)
- Best for: General identification scenarios where strong confidence is required.
- Action: Safe for automatic approval in most applications.
⚠️ Moderate Match (65% - 74%)
- Best for: Cases where additional review is acceptable before finalizing the decision.
- Action: Manual verification recommended before confirming a match.
⚠️ Low Confidence Match (50% - 64%)
- Best for: Situations requiring strict validation before acceptance.
- Action: Use alternative verification methods. Do not rely on this score alone.
❌ No Match (0% - 49%)
- Best for: Definitive rejection of mismatches.
- Action: Automatically reject matches in this range.
Configurations #
The Config class provides detailed control over the image and capture settings.
1. Image Configuration #
Use ConfigImage to manage image-specific settings.
| Property | Description |
|---|---|
ImageQuality |
Quality of the output image (e.g., photoQuality, documentQuality, compressedDocument). |
DPI |
DPI of the output (e.g., 150, 200, 300). |
LayoutType |
Document layout (e.g., A3, A4, A5). |
ResizeMode |
Strategy for resizing the image: |
- preserveAspectOnly (default, recommended): Maintains aspect ratio while scaling. |
|
- stretchToExactSize: Forces exact width and height, may distort. |
|
- fitWithAspect: Fits within dimensions, maintaining aspect ratio with padding. |
Recommended Settings:
- ImageQuality:
documentQuality- DPI:
150or200- LayoutType:
A4- ResizeMode:
preserveAspectOnly
Example
Quickcapture _quickcapturePlugin = Quickcapture();
Config imgConfig = _quickcapturePlugin.config.image;
imgConfig.setImageQuality(ImageQuality.documentQuality);
imgConfig.setDPI(DPI.dpi200);
imgConfig.setLayoutType(LayoutType.A4);
imgConfig.setResizeMode(ResizeMode.preserveAspectOnly);
2. Capture Configuration #
Use ConfigCapture to manage capture-specific settings.
| Property | Description |
|---|---|
captureSound |
Enables or disables capture sound (true/false). |
enableFlash |
Enables or disables flash during capture (true/false). |
enableTorchOnLowLight |
Enables or disables feature of Automatically turn on the torch in low light condition. (true/false). |
showCaptureCountAndLimit |
Displays capture count and limit (true/false). |
colorMode |
Sets the color mode (rgb, grayScale). |
maxPage |
Limits the number of pages to capture. (0 = unlimited). |
cameraToggle |
Camera selection / flip behaviour (disabled, enableBackDefault, enableFrontDefault, forceBackOnly, forceFrontOnly). |
bottomStampData |
BottomStampData - This configuration will automatically print the specified text at the bottom of the captured image with correct alignment, font size and DPI. This also supports placeholders, such as {DATETIME}, which will be replaced with the current date and time from the device at the time of stamping. $ - for new line print.This will only support for captured with SDK camera image. |
cropFilter |
Document enhancement filter applied after cropping (none, enhance, magicColor, color, lighten, gray, xerox, ink). Default none. |
captureMode |
Capture experience used by the SDK camera (cameraCaptureReview = SDK camera with in-app review, systemCameraCaptureReview = system camera with in-app review). Default cameraCaptureReview. |
perspectiveCorrection |
Applies perspective correction to detected document edges (true/false). Leave unset (null) to keep the SDK default. |
Example
Quickcapture _quickcapturePlugin = Quickcapture();
Config captureConfig = _quickcapturePlugin.config.capture;
captureConfig.enableFlash = true;
captureConfig.captureSound = false;
captureConfig.maxPage = 2;
captureConfig.cameraToggle = CameraToggleType.enableBackDefault;
captureConfig.bottomStampData = "Scanned on {DATETIME} $ Scanned User ID :123456";
captureConfig.cropFilter = CropFilter.enhance;
captureConfig.captureMode = CaptureMode.cameraCaptureReview;
captureConfig.perspectiveCorrection = true;
3. Review Configuration #
Use ConfigReview to manage review-specific settings.
| Property | Description |
|---|---|
enableAutoCorrectDocAngle |
Enables or disables capture sound (true/false). For any scenario (Normal photo capture) if auto rotation is not needed then host application should disbale it using this config. |
Example
Quickcapture _quickcapturePlugin = Quickcapture();
Config reviewConfig = _quickcapturePlugin.config.review;
reviewConfig.enableAutoCorrectDocAngle = true;
Method Summary #
✓ supported · — not available on that platform: it fails with a PlatformException, code UNSUPPORTED_ON_WEB on web and UNSUPPORTED_ON_PLATFORM on Android/iOS. On web, file paths are blob: URLs (see Web).
| Method | Description | Return Value | Android | iOS | Web |
|---|---|---|---|---|---|
activateLicense |
Activates the plugin license. | true on success. |
✓ | ✓ | ✓ |
initialize |
Initializes the plugin. | void. |
✓ | ✓ | ✓ |
startCapture |
Starts document capture. | JSON with capture details. | ✓ | ✓ | — |
startImageAttach |
Opens the review screen for an image from the gallery or another source. | JSON with capture details. | ✓ | ✓ | — |
assetCapture |
Captures an asset photo (no cropping or filters). | JSON with capture details. | ✓ | ✓ | — |
signatureCapture |
Launches the signature capture screen. | JSON with capture details. | ✓ | ✓ | — |
humanFaceCapture |
Launches the human face capture screen. | JSON with capture details. | ✓ | ✓ | — |
buildPDFForLastCapture |
Generates a PDF from the last capture. | File path of the PDF. | ✓ | ✓ | — |
buildTIFFForLastCapture |
Generates a TIFF from the last capture. | File path of the TIFF. | ✓ | ✓ | — |
setCustomLayout |
Sets custom layout dimensions. | true on success. |
✓ | ✓ | ✓ |
compressToJPEG |
Compresses and optimizes an image. | File path of the JPEG. | ✓ | ✓ | ✓ |
buildPDF |
Builds one compressed PDF from a list of images. | File path of the PDF. | ✓ | ✓ | ✓ |
buildTiff |
Builds one compressed TIFF from a list of images. | File path of the TIFF. | ✓ | ✓ | ✓ |
readImageInfo |
Reads image metadata: size, page count, colour type. | JSON with the image information. | ✓ | ✓ | ✓ |
startOpticalCodeCapture |
Scans a QR code or barcode with the camera. | JSON with the scanned data. | ✓ | ✓ | — |
generateQRCode |
Generates a QR code image. | Base64 PNG. | ✓ | ✓ | — |
generateBARCode |
Generates a barcode image. | Base64 PNG. | ✓ | ✓ | — |
getDeviceInfo |
Reads device details. | JSON with device details. | ✓ | ✓ | — |
getLocationInfo |
Reads the current location and DigiPIN. | JSON with location details. | ✓ | ✓ | — |
getCurrentDigiPin |
Reads the current DigiPIN. | DigiPIN string. | ✓ | ✓ | — |
getSecurityInfo |
Reads the device security report. | JSON with the security report. | ✓ | ✓ | — |
enableScreenProtection / disableScreenProtection |
Blocks or allows screenshots and screen recording. | void. |
✓ | ✓ | — |
startDeviceMonitoring / stopDeviceMonitoring |
Starts or stops live security monitoring. | void. |
✓ | ✓ | — |
deviceThreatEvents |
Security events while monitoring is on. | Stream of {threatType, message}. |
✓ | ✓ | — |
initHumanFaceHelper |
Initializes the Human Face Helper module. | void. |
✓ | ✓ | — |
detectHumanFaces |
Detects human faces in the input image. | JSON response of the detection. | ✓ | ✓ | — |
matchHumanFaces |
Compares two detected faces and determines their similarity. | JSON response of the match. | ✓ | ✓ | — |
getSdkInfo |
Reads the web imaging SDK's module and version. | JSON with MODULE, UPDATEDON, VERSION. |
— | — | ✓ |
setOutputFilter |
Sets colour, black and white or grayscale output pages. | true when applied. |
— | — | ✓ |
Plugin Dependencies #
To ensure smooth functionality and cross-platform compatibility, the plugin relies on the following dependencies.
1. Collection #
- Version:
^1.19.0 - Purpose: Provides advanced collection manipulation utilities in Dart, such as:
- Equality comparison
- Ordering utilities
- Additional helper methods
- Documentation: Collection Package
2. Flutter #
- Source: Flutter SDK
- Purpose: Core framework for building the plugin and integrating with Flutter applications.
- Documentation: Flutter Framework
3. Plugin Platform Interface #
- Version:
^2.0.2 - Purpose: Defines platform interface libraries for Flutter plugins, ensuring proper implementation for:
- Android
- iOS
- Other supported platforms
- Documentation: Plugin Platform Interface
Notes #
- Initialization: Always call
initializebefore using the plugin. - License Activation: Ensure the license is activated before use for all features.Replace placeholders like
"<Your Android License Key>"and"<Your iOS License Key>"with your actual license keys provided by Extrieve Technologies.*
Regarding accuracy : #
The accuracy of face detection and matching technologies depends on input image quality, including factors such as image distortion, rotation angles, lighting conditions, and color consistency. While offline solutions effectively reduce manual effort and operational costs, they do not guarantee 100% reliability in all scenarios. This system enables on-device verification, efficiently identifying doubtful matches and flagging them for backend verification within the offline environment. By integrating backend validation, the system enhances reliability without relying on external APIs. Additionally, when a match achieves high accuracy as defined in the accuracy thresholds, the system can be considered reliable even without backend verification, making it a valuable solution for offline scenarios where external validation is limited. For use cases demanding exceptionally high accuracy and reliability, an API-based advanced system is recommended.
Additional Information #
- Author: Extrieve Technologies
- Website: https://www.extrieve.com
- Support: For any issues or questions, please contact our support team at devsupport@extrieve.com.
- For more information, refer to the Extrieve Quickcapture.
Getting Help #
For help getting started with Flutter, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Important #
- Privacy and Security: Always handle user data securely and ensure compliance with applicable laws and regulations when processing personal identification documents.
- Error Handling: Implement proper error handling in your application to provide a smooth user experience.