Skip to content
pubscout

document_scan

0.5.0, released 3 weeks ago by toughapps.app

Offline document edge detection for Flutter returning corner coordinates.

$ flutter pub add document_scan
Source repository

What it does

Detects document edges and corner coordinates from live camera frames or still photos using native vision engines. It performs perspective correction and filtering to produce clean scanned documents, leaving UI and camera management entirely to the developer.

AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need custom camera UI and UX while retaining document edge detection.
  • You require fully offline document scanning without external cloud services or bundled ML models.
  • You need corner coordinates and processed image bytes rather than a pre-packaged fullscreen view.

Skip it when

  • You want a ready-to-use drop-in fullscreen document scanner UI out of the box.
  • You need built-in OCR capabilities included with the scanner.

Strengths

  • Widget-free and camera-agnostic, giving full control over the user interface.
  • Runs fully offline using native platform vision engines (Apple Vision on iOS, OpenCV on Android).
  • Supports real-time live-frame detection streams with stabilization and auto-capture analysis.

Weaknesses

  • Requires you to bring your own camera package and build the camera preview and overlay UI.
  • Perspective-correction warp is CPU intensive and runs on a background isolate.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

No camera dependency bundled; you must supply your own camera setup and pass frames as ScanInput.

import 'package:document_scan/document_scan.dart';

final scanner = DocumentScanner();
final scan = await scanner.scan(ScanInput.file('/path/to/photo.jpg'));
if (scan != null) {
  Image.memory(scan.bytes);
}

Alternatives

Packages that do the same job and could replace document_scan.

Works with

Packages commonly used together with document_scan: ones it builds on, ones built on it, and its own family.