# qr 3.0.2

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




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'qr:3.0.2'
```
Published: 2024-07-16T20:14:06.317843Z
Expected archive SHA-256: 5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445

Available in cache; verification: upstream_checksum
## Direct dependencies
- meta: ^1.7.0

## Package README (untrusted upstream documentation)
A QR code generation library for Dart and Flutter.

[![Pub Package](https://img.shields.io/pub/v/qr.svg)](https://pub.dev/packages/qr)
[![package publisher](https://img.shields.io/pub/publisher/qr.svg)](https://pub.dev/packages/qr/publisher)
[![CI](https://github.com/kevmoo/qr.dart/actions/workflows/ci.yml/badge.svg)](https://github.com/kevmoo/qr.dart/actions/workflows/ci.yml)

# Features

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

# Getting started

To start, import the dependency in your code:

```dart
import 'package:qr/qr.dart';
```

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

```dart
final qrCode = QrCode(4, QrErrorCorrectLevel.L)
  ..addData('Hello, world in QR form!');
final qrImage = QrImage(qrCode);
```

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

```dart
for (var x = 0; x < qrImage.moduleCount; x++) {
  for (var y = 0; y < qrImage.moduleCount; y++) {
    if (qrImage.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](https://pub.dev/packages/qr_flutter) - A Flutter Widget to render
QR codes

[barcode](https://pub.dev/packages/barcode) - A package that supports many types
of scannable codes, include QR.

# Demo

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

## Changelog
## 3.0.2

- Require package `web: ^1.0.0`.
- Require Dart 3.4 or greater.

## 3.0.1

- Fix example in `README.md`.
- Require Dart 2.16 or greater.

## 3.0.0

- `QrImage` added to handle image bits.
- `QrCode.make()` removed
- `QrCode.isDark()` moved to `QrImage`
- Added alpha numeric mode support via `addAlphaNumeric`

## 2.1.0

- Added numeric mode support via `addNumeric`

## 2.0.0

- Expose Mask Pattern as a parameter of QrCode.make()
- Migrated to null safety.
- Require Dart SDK `>=2.12.0 <3.0.0`.

## 1.3.0

- Added `QrCode.addByteData`.
- Added `QrCode.fromUint8List`.

## 1.2.1

- Require Dart SDK `>=2.6.0 <3.0.0`.

## 1.2.0

- Expose `InputTooLongException` exception so that applications and libraries
  can check for data length errors.

## 1.1.1

- Require Dart SDK `>=2.1.0 <3.0.0`.
- Fix a bug that fromData doesn't add supplied data.

## 1.1.0

- Add `fromData` QrCode factory that allows QrCode initiation without providing
  `typeNumber`.

## 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.







 
