qr 1.0.1

  • readme.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 93

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

Demo

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

Authors

1.0.1

  • Support Dart 2 stable.

1.0.0

  • Require at least Dart SDK 2.0.0-dev.17.
  • Fixed a subtle bug with number handling.

0.1.0+2

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

0.1.0+1

  • Fix author email.

0.1.0

  • Initial release.

Use this package as a library

1. Depend on it

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


dependencies:
  qr: ^1.0.1

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 flutter 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
1.0.1 Aug 8, 2018 Go to the documentation of qr 1.0.1 Download qr 1.0.1 archive
1.0.0 Apr 11, 2018 Go to the documentation of qr 1.0.0 Download qr 1.0.0 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
Popularity:
Describes how popular the package is relative to other packages. [more]
86
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
93
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.3

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.17 <3.0.0
Dev dependencies
build_runner ^0.10.0
build_web_compilers ^0.4.0
test ^1.0.0