scan_document 0.3.0 copy "scan_document: ^0.3.0" to clipboard
scan_document: ^0.3.0 copied to clipboard

A package to scan documents using camera and convert it to a PDF.

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:open_file/open_file.dart';
import 'package:scan_document/scan_document.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark(),
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  const Home({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Plugin example app'),
      ),
      body: Center(
        child: TextButton(
          child: Text("Scan Documen t"),
          onPressed: () async {
            File? pdf = await scanDocument(context);
            if (pdf != null) OpenFile.open(pdf.path);
          },
        ),
      ),
    );
  }
}
4
likes
0
pub points
31%
popularity

Publisher

verified publisheraawaz.dev

A package to scan documents using camera and convert it to a PDF.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

camera, flutter, image, path_provider, pdf

More

Packages that depend on scan_document