doc_scan_lite 0.0.2 copy "doc_scan_lite: ^0.0.2" to clipboard
doc_scan_lite: ^0.0.2 copied to clipboard

Lightweight document scanner plugin: live edge detection and perspective crop via classical CV over FFI. No ML models, no Play Services, no OpenCV.

example/lib/main.dart

import 'package:doc_scan_lite/doc_scan_lite.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'doc_scan_lite example',
      theme: ThemeData(colorSchemeSeed: Colors.teal, useMaterial3: true),
      home: const ScannerScreen(),
    );
  }
}

/// The entire integration: drop in [DocScannerView], handle the captured crop.
/// Camera setup, lifecycle, the live edge overlay, the capture button, the
/// optional drag-to-adjust step, and the result preview are all handled by the
/// widget. `enableManualAdjust: true` inserts the manual corner editor before
/// the final crop.
class ScannerScreen extends StatelessWidget {
  const ScannerScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('doc_scan_lite')),
      body: DocScannerView(
        enableManualAdjust: true,
        onCaptured: (CapturedDocument doc) {
          debugPrint('Captured ${doc.width}x${doc.height} document');
        },
      ),
    );
  }
}
3
likes
160
points
154
downloads

Documentation

API reference

Publisher

verified publisherchinmaysinghmodak.com

Weekly Downloads

Lightweight document scanner plugin: live edge detection and perspective crop via classical CV over FFI. No ML models, no Play Services, no OpenCV.

Repository (GitHub)
View/report issues

Topics

#document-scanner #computer-vision #image-processing #camera #ffi

License

MIT (license)

Dependencies

camera, ffi, flutter, plugin_platform_interface

More

Packages that depend on doc_scan_lite

Packages that implement doc_scan_lite