最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

dart - Generate GS1 DataMatrix in Flutter - Stack Overflow

programmeradmin6浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论