Scan MRZ (Machine Readable Zone) from identity documents (passport, id, visa) using iOS and Android. Heavily insipred by QKMRZScanner.
Hello,
Sorry that the plugin didn’t work well for all of you. Unfortunately, I don’t have testing devices and time for investigations and fixing issues at the moment. Please feel free to create new tickets. I would be even more grateful for pull requests. I’m not abandoning the plugin and promise to merge contributions with fixes and new functionality, hence I would kindly ask for help with the development 🙂
Thanks in advance!
- TD1
- TD2
- TD3
- MRV-A
- MRV-B
Add to pubspec.yaml
dependencies:
flutter_mrz_scanner: <latest_version_here>Set iOS deployment target to 13.
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>The plugin supports both Swift Package Manager and CocoaPods, and Flutter picks
whichever your project uses. Swift Package Manager is strongly recommended:
the CocoaPods build depends on SwiftyTesseract 3.1.3, whose binary has no arm64
simulator slice, so it cannot run on Apple Silicon simulators. The Swift package
links an xcframework that does, so flutter run works on any simulator.
Swift Package Manager builds fetch a ~219 MB Tesseract xcframework on first build. It is cached afterwards, per machine.
Camera permission will be automatically added to your AndroidManifest.xml. Do not forget to request this permission.
Use MRZScanner widget:
MRZScanner(
withOverlay: true, // optional overlay
onControllerCreated: (controller) =>
onControllerCreated(controller),
)Refer to example project for the complete app sample.
- Anna Domashych for helping with mrz_parser implementation in Dart
- Anton Derevyanko for hours of Android-related discussions
- Mattijah for beautiful QKMRZScanner library
flutter_mrz_scanner is released under a MIT License. See LICENSE for details.