qr 0.1.0+2

  • readme.md
  • Installing
  • Versions
  • new76

QR - Dart is a QR code generation library written in Dart.

Build Status


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


You can install the package by adding the following lines to your pubspec.yaml:

  qr: "^0.1.0+1"

After adding the dependency to your pubspec.yaml you can run: pub get or flutter packages get if you're using Flutter.

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!");

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


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



  • Update README to include basic documentation
  • Update pubspec.yaml description


  • Fix author email.


  • Initial release.

1. Depend on it

Add this to your package's pubspec.yaml file:

  qr: "^0.1.0+2"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:qr/qr.dart';
Version Uploaded Documentation Archive
0.1.0+2 Mar 4, 2018 Go to the documentation of qr 0.1.0+2 Download qr 0.1.0+2 archive
0.1.0+1 Mar 3, 2018 Go to the documentation of qr 0.1.0+1 Download qr 0.1.0+1 archive
0.1.0 Mar 3, 2018 Go to the documentation of qr 0.1.0 Download qr 0.1.0 archive


We analyzed this package on Mar 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.31.0
  • pana: 0.10.3


Describes how popular the package is relative to other packages. [more]
52 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:qr/qr.dart.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use qr.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
Dev dependencies
bot ^0.28.0
test ^0.12.13