barcode
2.2.9, released 2 years ago by nfet.net
Barcode generation library for Dart that can generate generic drawing operations for any backend.
What it does
Generates generic drawing operations and formats (like SVG) for 1D and 2D barcodes including QR codes, Data Matrix, PDF417, and various product codes. It relies purely on Dart with no platform-dependent implementation, acting as a base library for generating barcodes across different outputs.
AI-written summary of version 2.2.9, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to generate barcodes in pure Dart or backend environments.
- You want to produce SVG, PDF, or custom drawn barcodes.
Skip it when
- You need to scan or read barcodes from a camera rather than generate them.
- You are looking for a pre-built Flutter widget directly out of the box (use barcode_widget instead).
Strengths
- Supports a wide variety of 1D, 2D, and height-modulated barcodes.
- Platform-agnostic with no platform-dependent implementation.
- Can output generic drawing operations and SVGs.
Weaknesses
- Does not include camera scanning capabilities.
- Requires helper libraries or packages like barcode_widget or pdf for high-level rendering in Flutter or PDF apps.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
final dm = Barcode.dataMatrix();
final svg = dm.toSvg('Hello World!', width: 200, height: 200);
await File('barcode.svg').writeAsString(svg);Alternatives
Packages that do the same job and could replace barcode.
- syncfusion_flutter_barcodes
A Flutter barcode generator library for 1D and 2D machine-readable barcodes.
88Compare - flutter_drawing_board
A Flutter widget for interactive drawing with tools, undo/redo, and image export.
62Compare
Works with
Packages commonly used together with barcode: ones it builds on, ones built on it, and its own family.
- qrbarcode depends on itA pure‑Dart library for generating QR code data and image matrices.
- pdfBuilt on barcodeA PDF generation library for Dart and Flutter using a widget-like layout system.
- barcode_widgetBuilt on barcodeBarcode generation widget for Flutter
- barcode_imageBuilt on barcodeGenerates barcodes as image files using the Dart image library.
- codelessly_sdkBuilt on barcodeRender server-driven UI layouts designed in the Codelessly Editor natively in Flutter.