document_camera_frame 0.0.1 copy "document_camera_frame: ^0.0.1" to clipboard
document_camera_frame: ^0.0.1 copied to clipboard

Flutter package for capturing and cropping document images with a customizable camera interface.

example/lib/main.dart

import 'package:document_camera_frame/document_camera_frame.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(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: DocumentCameraFrame(
          frameWidth: 300.0,
          frameHeight: 400.0,
          // captureButtonTextStyle: const TextStyle(fontSize: 24),
          captureButtonStyle: ElevatedButton.styleFrom(
            backgroundColor: Colors.white,
            foregroundColor: Colors.black,
            padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 10),
          ),
          screenTitle: const Text(
            'Capture Your Document',
            style: TextStyle(color: Colors.white, fontSize: 20),
          ),
          captureButtonText: 'Snap',
          saveButtonText: 'Keep',
          retakeButtonText: 'Retry',
          onCaptured: (imgPath) {
            debugPrint('Captured image path: $imgPath');
          },
          onSaved: (imgPath) {
            debugPrint('Saved image path: $imgPath');
          },
          onRetake: () {
            debugPrint('Retake button pressed');
          },
        ),
      ),
    );
  }
}
37
likes
0
points
271
downloads

Publisher

verified publisherahmedzein.dev

Weekly Downloads

Flutter package for capturing and cropping document images with a customizable camera interface.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

camera, cupertino_icons, flutter, flutter_animate, image, path_provider

More

Packages that depend on document_camera_frame