dart - Generate GS1 DataMatrix in Flutter - Stack Overflow

Simple example of BarcodeWidget from pub:barcode_widgetString code = "010460437111281215A&r2L

Simple example of BarcodeWidget from pub:barcode_widget

String code = "010460437111281215A&r2L93P2t1"
return pw.BarcodeWidget(
      margin: pw.EdgeInsets.all(24),
      drawText: false,
      barcode: Barcode.dataMatrix(),
      data: code);

As a result I get DataMatrix, not GS1 DataMatrix because the FNC1 symbol is missing at the beginning of the code.

I tried adding FNC1 to the beginning of the code like {FNC1}, < FNC1 >, è (etc ASCII 0232).

Hint of dataMatrix() func is

Use [DataMatrixEncoder] to generate GS1 codes

I tried add fnc1 by [DataMatrixEncoder], but nothing works.

Please, help me to create GS1 DataMatrix barcode and show it on the screen.

Simple example of BarcodeWidget from pub:barcode_widget

String code = "010460437111281215A&r2L93P2t1"
return pw.BarcodeWidget(
      margin: pw.EdgeInsets.all(24),
      drawText: false,
      barcode: Barcode.dataMatrix(),
      data: code);

As a result I get DataMatrix, not GS1 DataMatrix because the FNC1 symbol is missing at the beginning of the code.

I tried adding FNC1 to the beginning of the code like {FNC1}, < FNC1 >, è (etc ASCII 0232).

Hint of dataMatrix() func is

Use [DataMatrixEncoder] to generate GS1 codes

I tried add fnc1 by [DataMatrixEncoder], but nothing works.

Please, help me to create GS1 DataMatrix barcode and show it on the screen.

Share Improve this question edited Mar 21 at 5:05 Munsif Ali 6,5005 gold badges25 silver badges54 bronze badges asked Mar 21 at 4:54 Артем ИльинскийАртем Ильинский 2991 silver badge10 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

So, another library is worked. package:zxing_widget/

BarcodeWidget(
            DataMatrixPainter(
              compact: true,
              gs1Format: true,
              '0104111123005281215A&r293P2t1',
              foregroundColor: Colors.blue,
            ),
            size: Size(200, 200),
          ),

But without < compact: true > it not worked. If true, GS1 Datamatrix well done.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744372675a4571031.html

相关推荐

  • dart - Generate GS1 DataMatrix in Flutter - Stack Overflow

    Simple example of BarcodeWidget from pub:barcode_widgetString code = "010460437111281215A&r2L

    7天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信