qr 2.0.0-nullsafety copy "qr: ^2.0.0-nullsafety" to clipboard
qr: ^2.0.0-nullsafety copied to clipboard

outdated

A QR code generation library for Dart and Flutter. Supports QR code version 1 through 40, error correction and redundancy.

A QR code generation library for Dart and Flutter.

Build Status

Features #

  • Supports QR code versions 1 - 40
  • Error correction / redundancy

Getting started #

To start, import the dependency in your code:

import 'package:qr/qr.dart';

To build your QR code data you should do so as such:

final qrCode = new QrCode(4, QrErrorCorrectLevel.L);
qrCode.addData("Hello, world in QR form!");
qrCode.make();

Now you can use your _qrCode instance to render a graphical representation of the QR code. A basic implementation would be as such:

for (int x = 0; x < qrCode.moduleCount; x++) {
  for (int y = 0; y < qrCode.moduleCount; y++) {
    if (qrCode.isDark(y, x)) {
      // render a dark square on the canvas
    }
  }
}

See the example directory for further details.

Pre-made UI libraries #

The following libraries use qr.dart to generate QR codes for you out of the box:

QR - Flutter - A Flutter Widget to render QR codes

QR - AngularDart - An AngularDart component to render QR codes

Demo #

A working demo can be found here: https://kevmoo.github.io/qr.dart/

190
likes
0
points
2.43M
downloads

Publisher

verified publisherkevmoo.com

Weekly Downloads

A QR code generation library for Dart and Flutter. Supports QR code version 1 through 40, error correction and redundancy.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta

More

Packages that depend on qr