Scanify Web Document Scanner

PubVersion PubPoints build Star on Github Latest Dartdocs

ios

A Flutter Package to Scan Document on WEB.

Contents:

Getting Started

Add dependencies in the pubspec.yaml:

dependencies:
  scanify_web: ^latest

Get the Changes by:

flutter pub get

or

dart pub get

Usage

import 'package:scanify_web/scanify_web.dart';

ScanifyController must be initialized:

  void _controllerInitialization() async {
  scanifyStatus = ScanifyStatus.initializing;
  final List<CameraDescription> cameras = await availableCameras();
  if (cameras.isNotEmpty) {
    final CameraDescription selectedCamera = cameras.first;
    scanifyController = ScanifyController(description: selectedCamera);
    if (scanifyController != null) {
      await scanifyController?.initialize();
    } else {
      throw Exception(PackageStrings.throwErrorControllerInitialization);
    }
  } else {
    throw Exception(PackageStrings.throwErrorCameraAvailability);
  }
}

ScanifyController Can be Initialized in page initialization OR triggered by a trigger such as tapping on a Button:

  void onInit() {
  _controllerInitialization();
  super.initState();
}

OR

Button(onPressed: () => _controllerInitialization(), child: Text('ScanifyController Initialization'));

NOTE: In either way, ScanifyController must be initialized before having Scanner Widget.

Using Scanner Widget in your Screen:

ScanifyWebScanner(scanifyController!);

Controller will return the Captured Document:

ScanifyResponse scanifyResponse = await scanifyController!.startAutoScan();

The Status of the Scanify can be controlled by setting the ScanifyStatus of the ScanifyController:

ScanifyStatus scanifyStatus = ScanifyStatus.scanning;

You can check the /example for a more complete example, more details and further information.

Docs

build

About Author

Resam Taghipour

Pub account Pub Pub

Packages and Dependencies

Pub Pub Pub Pub

License

This project is licensed under the 'BSD-3-Clause' License - see the LICENSE for details.

Pub

Libraries

scanify_web
Extensions Boiler Plate