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

outdated

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

flutter_mrz_scanner #

Scan MRZ (Machine Readable Zone) from identity documents (passport, id, visa) using iOS and Android. Heavily insipred by QKMRZScanner.

Supported formats: #

  • TD1
  • TD2
  • TD3
  • MRV-A
  • MRV-B

Usage #

Import the package #

Add to pubspec.yaml

dependencies:
  flutter_mrz_scanner: ^0.7.0

For iOS #

The plugin use native view, which is not yet supported by default. To make it work add the following code to Info.plist:

    <key>io.flutter.embedded_views_preview</key>
    <string>YES</string>

The plugin uses the device camera, so do not forget to provide the NSCameraUsageDescription. You may specify it in Info.plist like that:

    <key>NSCameraUsageDescription</key>
    <string>May I scan a MRZ please?</string>

For Android #

Add

<uses-permission android:name="android.permission.CAMERA" />

to AndroidManifest.xml

Use the widget #

...
MRZScanner(
  onParsed: (result) {
    print(result.documentType);
    print(result.countryCode);
    print(result.surnames);
    print(result.givenNames);
    print(result.documentNumber);
    print(result.nationalityCountryCode);
    print(result.birthDate);
    print(result.sex);
    print(result.expiryDate);
    print(result.personalNumber);
    print(result.personalNumber2);
  },
  onError: (error) => print(error),
),
...

Refer to example project for the complete app sample.

Acknowledgements #

License #

flutter_mrz_scanner is released under a MIT License. See LICENSE for details.

35
likes
0
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

License

unknown (license)

Dependencies

flutter, mrz_parser

More

Packages that depend on flutter_mrz_scanner