flutter_mrz_scanner 2.1.0 copy "flutter_mrz_scanner: ^2.1.0" to clipboard
flutter_mrz_scanner: ^2.1.0 copied to clipboard

Scans MRZ (Machine Readable Zone) from identity documents for iOS and Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_mrz_scanner_example/camera_page.dart';
import 'package:permission_handler/permission_handler.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: FutureBuilder<PermissionStatus>(
        future: Permission.camera.request(),
        builder: (context, snapshot) {
          if (snapshot.hasData && snapshot.data == PermissionStatus.granted) {
            return CameraPage();
          }
          if (snapshot.data == PermissionStatus.permanentlyDenied) {
            // The user opted to never again see the permission request dialog for this
            // app. The only way to change the permission's status now is to let the
            // user manually enable it in the system settings.
            openAppSettings();
          }
          return Scaffold(
            body: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  const CircularProgressIndicator(),
                  const Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text('Awaiting for permissions'),
                  ),
                  Text('Current status: ${snapshot.data?.toString()}'),
                ],
              ),
            ),
          );
        },
      ),
    );
  }
}
32
likes
140
pub points
85%
popularity

Publisher

verified publisherleushchenko.com

Scans MRZ (Machine Readable Zone) from identity documents for iOS and Android.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, mrz_parser

More

Packages that depend on flutter_mrz_scanner