flutter_document_scanner 0.1.0 copy "flutter_document_scanner: ^0.1.0" to clipboard
flutter_document_scanner: ^0.1.0 copied to clipboard

outdated

A Flutter plugin that allows the management of taking, cropping and applying filters to an image, using the camera plugin

example/lib/main.dart

import 'dart:typed_data';

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  final _controller = DocumentScannerController();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData.light().copyWith(
        primaryColor: Colors.teal,
      ),
      home: Builder(
        builder: (context) {
          return Scaffold(
            body: DocumentScanner(
              controller: _controller,
              generalStyles: const GeneralStyles(
                baseColor: Colors.white,
              ),
              cropPhotoDocumentStyle: CropPhotoDocumentStyle(
                top: MediaQuery.of(context).padding.top,
              ),
              onSave: (Uint8List imageBytes) {
                // ? Bytes of the document/image already processed
              },
            ),
          );
        },
      ),
    );
  }
}
94
likes
80
pub points
87%
popularity

Publisher

unverified uploader

A Flutter plugin that allows the management of taking, cropping and applying filters to an image, using the camera plugin

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

bloc, camera, equatable, flutter, flutter_bloc

More

Packages that depend on flutter_document_scanner