Skip to content
pubscout

qr

4.0.1, released 3 weeks ago by kevmoo.com

A pure‑Dart library for generating QR code data and image matrices.

WASM-ready
$ flutter pub add qr
Source repository

What it does

It creates QR code payloads with configurable error correction and ECI support, then produces a module matrix that can be rendered manually. The API is immutable and works on all Dart platforms.

AI-written summary of version 4.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to generate QR codes in pure Dart or Flutter without a ready‑made widget
  • You want full control over rendering the QR modules yourself
  • You require ECI (Extended Channel Interpretation) or custom payload building

Skip it when

  • You need a ready‑made Flutter widget for QR display
  • You need QR scanning functionality

Strengths

  • Supports all QR versions (1‑40) and error‑correction levels
  • ECI support for multi‑language payloads
  • Pure Dart, works on all platforms
  • Immutable API reduces bugs

Weaknesses

  • No built‑in Flutter widget, you must render the matrix yourself
  • Breaking API changes in recent major versions
  • Requires Dart SDK ^3.13.0

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:qr/qr.dart';

final qrCode = QrCode(
  payload: QrPayload.fromString('Hello, world in QR form!'),
  errorCorrectLevel: QrErrorCorrectLevel.low,
);
final qrImage = QrImage(qrCode);
// Render qrImage.moduleCount x qrImage.moduleCount matrix as needed

Alternatives

Packages that do the same job and could replace qr.

  • fhir_path

    Model-independent FHIRPath evaluation engine in Dart, port of the Java reference implementation.

  • reflectable

    Provides runtime reflection via code generation with configurable capabilities.

  • path_parsing

    Pure Dart library for parsing SVG path strings and generating Dart path code.

  • anyhow

    Dart implementation of Rust's Result monad type and anyhow crate for error handling.

Works with

Packages commonly used together with qr: ones it builds on, ones built on it, and its own family.