scanflow_datacapture_tyre 2.1.0 copy "scanflow_datacapture_tyre: ^2.1.0" to clipboard
scanflow_datacapture_tyre: ^2.1.0 copied to clipboard

Scanflow is an AI scanner on smart devices for data capture and workflow automation.

Scanflow Data Capture Tyre #

Pub package

Scanflow Data Capture Tyre is a Flutter plugin for scanning tyre-related data (tyre size, brand, DOT, number, handwritten digits) using the Scanflow AI SDK. It provides a ready-to-use camera scanner widget with configurable scan types, flash, and callbacks.

The plugin connects to the native Scanflow SDK via Flutter and requires the scanflow_core_scan package as a dependency.

Requirements #

iOS Android
Supported minSdk >= 24

Example #

Minimal example: show the scanner and handle the result.

import 'package:flutter/material.dart';
import 'package:scanflow_datacapture_tyre/tyre_capture.dart';
import 'package:scanflow_datacapture_tyre/models/tyre_scan_result_success.dart';

class ScannerPage extends StatefulWidget {
  const ScannerPage({super.key});

  @override
  State<ScannerPage> createState() => _ScannerPageState();
}

class _ScannerPageState extends State<ScannerPage> implements TextScanResultCallback {
  late final TextScanResultCallbackHandler _callbackHandler;

  @override
  void initState() {
    super.initState();
    _callbackHandler = TextScanResultCallbackHandler();
    _callbackHandler.registerCallback(this);
  }

  @override
  void onTextScanResultSuccess(TextScanResultMain textScanResult) {
    debugPrint('Scan result: ${textScanResult.textScanResult?.text}');
    if (Navigator.canPop(context)) {
      Navigator.pop(context, textScanResult);
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: TextCapture(
        licenseKey: 'YOUR_LICENSE_KEY_HERE',
        textScanResultBackHandler: _callbackHandler,
        scanType: TextScanType.tyreDot.name,
      ),
    );
  }
}

Quick Start Guide #

1. Get a license #

Get your license key from Scanflow Console. You need your app’s applicationId (Android) and bundleId (iOS) to generate a key. Each app needs its own license.

2. Add the plugin and core #

Add to your pubspec.yaml:

dependencies:
  scanflow_core_scan: ^2.1.0
  scanflow_datacapture_tyre: ^2.1.0

Then run:

flutter pub get

3. Import the plugin #

import 'package:scanflow_datacapture_tyre/tyre_capture.dart';
import 'package:scanflow_datacapture_tyre/models/tyre_scan_result_success.dart';

4. Add the callback handler and widget #

  • Create a TextScanResultCallbackHandler, register your callback (e.g. a widget that implements TextScanResultCallback).
  • Use the TextCapture widget with licenseKey, textScanResultBackHandler, and scanType (e.g. TextScanType.tyreDot, tyreSize, tyreBrand, tyreNumber, handwrittenDigit).

5. (Optional) Initialize models on iOS #

On iOS, you can pre-initialize models before showing the scanner:

await TextCapture.initializeModels();

6. Android configuration #

  • minSdkVersion: Set to at least 24 in your app’s android/app/build.gradle.
  • Flutter embedding: Ensure android/app/src/main/AndroidManifest.xml includes:
<meta-data
    android:name="flutterEmbedding"
    android:value="2" />

7. iOS configuration #

In ios/Runner/Info.plist add (or adjust) camera and location usage descriptions, for example:

  • Privacy - Camera Usage Description – e.g. $(PRODUCT_NAME) camera use
  • Privacy - Location When In Use Usage Description – if your app uses location

Installation (summary) #

Depend on it

flutter pub add scanflow_core_scan scanflow_datacapture_tyre

Or in pubspec.yaml:

dependencies:
  scanflow_core_scan: ^2.1.0
  scanflow_datacapture_tyre: ^2.1.0

Import it

import 'package:scanflow_datacapture_tyre/tyre_capture.dart';
import 'package:scanflow_datacapture_tyre/models/tyre_scan_result_success.dart';

Usage (TextCapture parameters) #

Parameter Description
licenseKey Required. Your Scanflow license key.
textScanResultBackHandler Required. Handler that receives scan results (implements TextScanResultCallback).
scanType One of: tyreSize, tyreBrand, tyreDot, tyreNumber, handwrittenDigit (use TextScanType.tyreDot.name etc.).
resolution Optional. e.g. SD - 480p, HD - 720p, Full HD - 1080p, 4K.
isBeepSound, isVibrate, isContinueScan Optional. Sound, vibration, and continuous scan.
flashLight, isAutoExposure, isAutoZoom Optional. Flash and camera behaviour.
buttonColor, buttonHeight, buttonRadius Optional. Capture button styling.
showScanIcon, captureButton Optional. Custom or default capture button.
isLandscape Optional. Layout for landscape.
designSize Optional. Reference size for responsive UI (e.g. Size(375, 812)).
controller Optional. TextCaptureController to trigger capture from outside.

Result is delivered via TextScanResultMain (e.g. textScanResult?.text, imageResult).

Additional information #

0
likes
130
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

Scanflow is an AI scanner on smart devices for data capture and workflow automation.

Homepage

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, scanflow_core_scan

More

Packages that depend on scanflow_datacapture_tyre

Packages that implement scanflow_datacapture_tyre