quickcapture 0.0.3 copy "quickcapture: ^0.0.3" to clipboard
quickcapture: ^0.0.3 copied to clipboard

outdated

QuickCapture Mobile Scanning SDK Specially designed for flutter from Extrieve.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:quickcapture/quickcapture.dart';

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

typedef MyCallback = void Function(String result);

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

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

class _MyAppState extends State<MyApp> {
  final _quickcapturePlugin = Quickcapture();

  @override
  void initState() {
    super.initState();
    // Set the method call handler
    //initPlatformState();
  }

  void _showAlertDialog(BuildContext context, String response) {
    showDialog(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          title: Text('Captured file path for test'),
          content: Text(response),
          actions: [
            TextButton(
              onPressed: () {
                // Close the dialog
                Navigator.of(context).pop();
              },
              child: Text('OK'),
            ),
          ],
        );
      },
    );
  }

  startCapture(context) async {
    String response = "";

    response = (await _quickcapturePlugin.startCapture())!;
    _showAlertDialog(context, response);
    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('QuickCapture sample'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () => {startCapture(context)},
            child: const Text("Done"),
          ),
        ),
      ),
    );
  }
}
16
likes
0
points
178
downloads

Publisher

verified publisherextrieve.com

Weekly Downloads

QuickCapture Mobile Scanning SDK Specially designed for flutter from Extrieve.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on quickcapture

Packages that implement quickcapture