mrz_parser 2.0.0 copy "mrz_parser: ^2.0.0" to clipboard
mrz_parser: ^2.0.0 copied to clipboard

Parse MRZ (Machine Readable Zone) from identity documents.

example/main.dart

import 'package:mrz_parser/mrz_parser.dart';

void main() {
  final mrz = [
    'P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<',
    'L898902C36UTO7408122F1204159ZE184226B<<<<<10'
  ];

  final result = MRZParser.tryParse(mrz);

  print(result?.documentType); // 'P'
  print(result?.countryCode); // 'UTO'
  print(result?.surnames); // 'ERIKSSON'
  print(result?.givenNames); // 'ANNA MARIA'
  print(result?.documentNumber); // 'L898902C3'
  print(result?.nationalityCountryCode); // 'UTO'
  print(result?.birthDate); // DateTime(1974, 08, 12)
  print(result?.sex); // Sex.female
  print(result?.expiryDate); // DateTime(2012, 04, 15)
  print(result?.personalNumber); // 'ZE184226B'
  print(result?.personalNumber2); // null
}
13
likes
130
pub points
89%
popularity

Publisher

verified publisherleushchenko.com

Parse MRZ (Machine Readable Zone) from identity documents.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on mrz_parser