Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate barcode in flutter?

I want to generate barcode in flutter but I only found barcode scanner packages like barcode_scan but I want something like zxing library (native in Android) for flutter that also generates Barcode in multiple formats like EAN, Code128 etc. Although my requirement is EAN.

like image 235
Ankit Shukla Avatar asked Jun 22 '18 09:06

Ankit Shukla


2 Answers

I've already implemented a Flutter library did just what you want.

Please check here barcode_flutter EAN8 and EAN13 are both supported.

Screenshot

like image 127
colin Avatar answered Nov 18 '22 03:11

colin


barcode_scan uses the zxing library for the Android plugin, so you could easily extend that plugin to support the APIs for barcode generation. For the iOS version of the plugin, AVMetadataMachineReadableCodeObject is used instead of zxing, since the iOS port of xzing has been discontinued. Flutter supports iOS 8.0+, and iOS 8.0 introduced APIs for generating barcodes as part of the Core Image API. The supported formats are:

  • square QR code
  • Aztec code symbol
  • PDF 417 symbol
  • Data Matrix code symbol

If the barcode you are looking for in this list, it will be easy to fork the barcode_scan package to add the generating functionality for your app.

like image 2
raju-bitter Avatar answered Nov 18 '22 03:11

raju-bitter