搜索插件、代码仓与 APP 分类

插件详情v1.1.4

zxing_lib

zxing 的 Dart 版本,可编码和解码多种一维/二维条形码。支持二维码、PDF417、一维条形码、MaxiCode、DataMatrix 和 Aztec。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
3.5万
喜欢数
27
Pub 分数
160

安装插件

flutter pub add zxing_lib

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

zxing_lib 是 ZXing 条形码库的 Dart 实现,支持多种一维和二维条形码(如 QR 码、PDF417、DataMatrix、Aztec、MaxiCode 和 OneD)的编码和解码。它支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台。专为无缝集成到 Flutter 应用而设计,提供可靠且跨平台的条形码功能,无需外部依赖。该包非常适合需要以各种格式扫描或生成条形码的应用程序。

适合场景

  • 移动应用中的条形码扫描
  • 生成二维码以共享数据
  • 在文档系统中处理PDF417
  • 在Web应用程序中集成条形码支持
  • 在库存系统中读取DataMatrix码
  • 创建基于阿兹特克的票务系统

主要特点

  • 支持多种条形码类型
  • 跨平台兼容性
  • 轻量级 Dart 版本
  • 无原生依赖
  • 解码的高精度
  • 与 Flutter 的轻松集成

适合对象

  • Flutter 开发人员构建支持条形码的应用程序
  • 需要多格式条形码支持的应用程序
  • 需要离线条形码处理的项目
  • 针对多个操作系统的开发人员
  • 寻求纯 Dart 解决方案的团队

使用建议

  • 仅限支持的条形码格式
  • 性能在低端设备上可能有所不同
  • 不包含实时摄像头流
  • 需要手动处理图像输入
  • 可能需要额外的UI组件来扫描
  • 未针对高速批量处理进行优化

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

ZXing-Dart

pub package

A Dart port of zxing that encode and decode multiple 1D/2D barcodes, Supported qrcode, pdf417, oned, maxicode, datamatrix, aztec.

ZXing Widget pub package
ZXing Scanner pub package

Why

  • Pure Dart implementation, no need to rely on native packages, good platform compatibility
  • Provide pure Dart encoding for all platforms
  • Provide pure Dart decoding for all platforms
  • Research learning and an exploration of Dart language

... At present, this package is far inferior to other native packages in decoding speed and accuracy, and can be used as a decoding tool and some platforms (such as Web and Desktop). I will also continue to pay attention to the improvement of zxing and the improvement of the performance problems in this project. And welcome suggestions for improvement from those with experience in decoding algorithms and image algorithms.

Feature

  • ✅ Core package translate

  • ✅ Core test translate

  • ✅ Core unit test(all passed)

  • ✅ Demo Creator

  • ✅ Demo Scanner (Decode from Captured picture or CameraImage from camera stream)

  • ✅ Code optimization

  • 🚧 Keep syncing from zxing java...

Preview

Demo App
01 02

Exception Type

  • IllegalArgumentException => ArgumentError
  • FormatException => FormatsException
  • IllegalStateException => StateError

Issue

  • Because there is no float type in dart, the results of some test cases are different from zxing

Flutter

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目