Skip to main content

lot_expiry_parser 0.1.0 copy "lot_expiry_parser: ^0.1.0" to clipboard
lot_expiry_parser: ^0.1.0 copied to clipboard

Reads the batch (lot) number and the expiry date from OCR text of product packs: LOT/EXP labels, ISO symbol columns, one-letter labels and unlabelled codes.

example/main.dart

import 'package:lot_expiry_parser/lot_expiry_parser.dart';

void main() {
  // Text lines as an OCR engine returned them, in reading order.
  final packs = <List<String>>[
    ['LOT AB123', 'EXP 2027-05'],
    ['B.N PM6111', r'MFG 04 \ 25', r'EXP 03 \ 27'],
    ['LOT', 'MFG', '1166/25', '10/2025', '09/2030'],
    ['B 144692609U', 'P 09/26 E 09/29'],
    ['C210Y50002', 'M 11/25', 'E 11/28'],
  ];

  for (final lines in packs) {
    final result = LotExpiryParser.parse(lines);
    print('$lines -> batch: ${result.batch}, expiry: ${result.expiry}');
  }
}
0
likes
160
points
52
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Reads the batch (lot) number and the expiry date from OCR text of product packs: LOT/EXP labels, ISO symbol columns, one-letter labels and unlabelled codes.

Repository (GitHub)
View/report issues

Topics

#ocr #parser #barcode #inventory #warehouse

License

MIT (license)

More

Packages that depend on lot_expiry_parser