How to decode FNC1 codes in GS1-128 barcode in Flutter?

1.9k Views Asked by At

Summary of the problem

I want to decode the FNC1 codes in GS1-128 barcode in flutter.

We know the GS1-128 structure is the following:

enter image description here

and GS1-128 uses application identifiers to describe information contained in a barcode, in above image we can see I use 420 routing aplication identifier followed by rounting information, when the information followed by the identifier code is variable we use FNC1 separator.

enter image description here

Goal

I need to know where is the FNC1 code in order to know where a new aplication identifier starts.

What I have done

I'm using barcode_scan** library and my code is the following:

  ScanOptions options = ScanOptions(
    useCamera: -1,
  );
  ScanResult result = await BarcodeScanner.scan(options: options);
  print(result.rawContent);

What I get is 420 123456789 92 123 912345678 1234567 1 what I expect is 420 123456789{FNC1}92 123 912345678 1234567 1

**https://pub.dev/packages/barcode_scan

1

There are 1 best solutions below

0
Omatt On

The barcode_scan plugin seems to have been discontinued. I recommend using flutter_zxing - a port of the zxing library. It should have suppport for GS1-128. FNC1 will have a symbology ID of ]C1 as mentioned in this thread.