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

插件详情v0.2.0

qr_code_tools

用于 iOS 和 Android 的 Flutter 插件,用于解码二维码。

AndroidiOS
近 30 天下载
3400
喜欢数
30
Pub 分数
140

安装插件

flutter pub add qr_code_tools

插件介绍

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

qr_code_tools 是一个专为 iOS 和 Android 设计的 Flutter 插件,可在移动应用程序中实现二维码解码。它提供了一个简单的接口,通过设备摄像头扫描并提取二维码中的数据。该插件轻量且性能优化,适用于需要快速可靠二维码识别的应用程序。它支持实时扫描和基于图像的解码,确保在不同使用场景下的灵活性。设计简洁,可无缝集成到 Flutter 项目中。

适合场景

  • 移动库存跟踪
  • 活动票务扫描
  • 通过二维码共享联系人
  • 数字支付发起
  • 产品信息查询

主要特点

  • 实时二维码扫描
  • 基于图像的二维码解码
  • 跨平台支持(iOS 和 Android)
  • 简单 API 集成
  • 轻量且快速的性能

适合对象

  • 零售和电子商务应用
  • 事件管理工具
  • 物流和资产追踪
  • 客户参与平台
  • 移动支付系统

使用建议

  • 两个平台都需要相机权限
  • 可能需要为摄像头预览添加额外的用户界面
  • 性能取决于设备摄像头的质量
  • 仅限二维码解码(不支持生成)
  • 对格式错误的代码没有内置的错误处理

原始 README

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

QR Code Tools

Build Status pub package

The Flutter plugin for iOS and Android to decoding QR codes.

Installation

First, add qr_code_tools as a dependency in your pubspec.yaml file.

iOS

Add one rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Photo Library Usage Description and a usage description.

Or in text format add the key:

<key>NSPhotoLibraryUsageDescription</key>
<string>Can I use the photo library please?</string>
Android

Nothing to do

Example

import 'package:qr_code_tools/qr_code_tools.dart';

String _data;

/// decode from local file
Future decode(String file) async {
  String data = await QrCodeToolsPlugin.decodeFrom(file);
  setState(() {
    _data = data;
  });
}

For a more elaborate usage example see here.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。