ocr_scan_text 1.3.1 copy "ocr_scan_text: ^1.3.1" to clipboard
ocr_scan_text: ^1.3.1 copied to clipboard

OCR Scan Text is a wrapper around the "Google ML kit Text Recognition" library.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:ocr_scan_text/ocr_scan_text.dart';
import 'package:ocr_scan_text_example/scan_all_module.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Scan"),
      ),
      body: Center(
        child: SizedBox(
          width: MediaQuery.of(context).size.width - 20,
          height: MediaQuery.of(context).size.height - 40,
          child: _buildLiveScan(),
        ),
      ),
    );
  }

  Widget _buildLiveScan() {
    return LiveScanWidget(
      ocrTextResult: (ocrTextResult) {
        ocrTextResult.mapResult.forEach((module, result) {});
      },
      scanModules: [ScanAllModule()],
    );
  }
}
37
likes
140
points
199
downloads

Publisher

unverified uploader

Weekly Downloads

OCR Scan Text is a wrapper around the "Google ML kit Text Recognition" library.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

camera, file_picker, flutter, google_mlkit_text_recognition, image, image_picker, path, path_provider, pdf_render, plugin_platform_interface

More

Packages that depend on ocr_scan_text