{"id":13550609,"url":"https://github.com/theyakka/qr.flutter","last_synced_at":"2025-05-15T08:11:24.308Z","repository":{"id":37782712,"uuid":"123728625","full_name":"theyakka/qr.flutter","owner":"theyakka","description":"QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.","archived":false,"fork":false,"pushed_at":"2024-06-28T17:45:05.000Z","size":1229,"stargazers_count":735,"open_issues_count":47,"forks_count":336,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-11T19:55:16.778Z","etag":null,"topics":["dart","dartlang","flutter","mobile","qr","qrcode","web"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/qr_flutter","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theyakka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-03T20:27:20.000Z","updated_at":"2025-03-29T06:25:17.000Z","dependencies_parsed_at":"2024-03-16T23:56:26.686Z","dependency_job_id":"4f6f4c34-17bf-409b-8b9a-9da7edd4d3cd","html_url":"https://github.com/theyakka/qr.flutter","commit_stats":{"total_commits":69,"total_committers":11,"mean_commits":"6.2727272727272725","dds":0.3913043478260869,"last_synced_commit":"1fc6e38c198a76a6fd60b7bd3b4c190cd6c9330b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theyakka%2Fqr.flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theyakka%2Fqr.flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theyakka%2Fqr.flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theyakka%2Fqr.flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theyakka","download_url":"https://codeload.github.com/theyakka/qr.flutter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301535,"owners_count":22047905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dartlang","flutter","mobile","qr","qrcode","web"],"created_at":"2024-08-01T12:01:35.302Z","updated_at":"2025-05-15T08:11:24.265Z","avatar_url":"https://github.com/theyakka.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"\u003cimg src=\"https://storage.googleapis.com/product-logos/logo_qr_flutter.png\" align=\"center\" width=\"200\"\u003e\n\nQR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.\n\n# Need help?\n\nPlease do not submit an issue for a \"How do i ..?\" or \"What is the deal with ..?\" type question. They will pretty much be closed instantly. If you have questions, please ask them on the Discussions board or on Stack Overflow. They will get answered there.\n\nUsing issues creates a large amount of noise and results in real issues getting fixed slower.\n\n# Features\n- Null safety\n- Built on [QR - Dart](https://github.com/kevmoo/qr.dart)\n- Automatic QR code version/type detection or manual entry \n- Supports QR code versions 1 - 40\n- Error correction / redundancy\n- Configurable output size, padding, background and foreground colors\n- Supports image overlays\n- Export to image data to save to file or use in memory\n- No internet connection required\n\n# Installing\n\n**Version compatibility**: 4.0.0+ supports null safety and requires a version of Flutter that is compatible.\nIf you're using an incompatible version of flutter, please use a 3.x version of this library.\n\nYou should add the following to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  qr_flutter: ^4.1.0\n```\n\n**Note**: If you're using the Flutter `master` channel, if you encounter build issues, or want to try the latest and greatest then you should use the `master` branch and not a specific release version. To do so, use the following configuration in your `pubspec.yaml`:\n \n```yaml\ndependencies:\n  qr_flutter:\n    git:\n      url: https://github.com/theyakka/qr.flutter\n```\n\nKeep in mind the `master` branch could be unstable.\n\nAfter adding the dependency to your `pubspec.yaml` you can run: `flutter packages get` or update your packages using\nyour IDE.\n\n# Getting started\nTo start, import the dependency in your code:\n\n```dart\nimport 'package:qr_flutter/qr_flutter.dart';\n```\n\nNext, to render a basic QR code you can use the following code (or something like it):\n\n```dart\nQrImageView(\n  data: '1234567890',\n  version: QrVersions.auto,\n  size: 200.0,\n),\n```\n\nDepending on your data requirements you may want to tweak the QR code output. The following options are available:\n\n| Property                  | Type                 | Description                                                                                                                                                                                         |\n|---------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `version`                 | int                  | `QrVersions.auto` or a value between 1 and 40. See http://www.qrcode.com/en/about/version.html for limitations and details.                                                                         |\n| `errorCorrectionLevel`    | int                  | A value defined on `QrErrorCorrectLevel`. e.g.: `QrErrorCorrectLevel.L`.                                                                                                                            |\n| `size`                    | double               | The (square) size of the image. If not given, will auto size using shortest size constraint.                                                                                                        |\n| `padding`                 | EdgeInsets           | Padding surrounding the QR code data.                                                                                                                                                               |\n| `backgroundColor`         | Color                | The background color (default is none).                                                                                                                                                             |\n| `eyeStyle`                | QrEyeStyle           | Configures the QR code eyes' (corners') shape and color.                                                                                                                                            |\n| `dataModuleStyle`         | QrDataModuleStyle    | Configures the shape and the color of the dots.                                                                                                                                                     |\n| `gapless`                 | bool                 | Adds an extra pixel in size to prevent gaps (default is true).                                                                                                                                      |\n| `errorStateBuilder`       | QrErrorBuilder       | Allows you to show an error state `Widget` in the event there is an error rendering the QR code (e.g.: version is too low, input is too long, etc).                                                 |\n| `constrainErrorBounds`    | bool                 | If true, the error `Widget` will be constrained to the square that the QR code was going to be drawn in. If false, the error state `Widget` will grow/shrink to whatever size it needs.             |\n| `embeddedImage`           | ImageProvider        | An `ImageProvider` that defines an image to be overlaid in the center of the QR code.                                                                                                               |\n| `embeddedImageStyle`      | QrEmbeddedImageStyle | Properties to style the embedded image.                                                                                                                                                             |\n| `embeddedImageEmitsError` | bool                 | If true, any failure to load the embedded image will trigger the `errorStateBuilder` or render an empty `Container`. If false, the QR code will be rendered and the embedded image will be ignored. |\n| `semanticsLabel`          | String               | `semanticsLabel` will be used by screen readers to describe the content of the QR code.                                                                                                             |\n| `borderRadius`            | double               | Setting corner rounding for shape types `QrEyeShape.square`, `QrDataModuleShape.square`, `EmbeddedImageShape.square`. Set in appropriate styles.                                                    |\n| `roundedOutsideCorners`   | bool                 | If true, the outer corners of the data are rounded. Set to `QrDataModuleStyle`. Rounded to `borderRadius` by default. Only `QrDataModuleShape.square`.                                              |\n| `outsideBorderRadius`     | double               | It is set if the outer rounding `outsideBorderRadius` should differ from the inner one `borderRadius`. No more than `borderRadius`. Only `QrDataModuleShape.square`                                 |\n| `gradient`                | Gradient             | Changing the solid color of the code to a gradient, e.g. `LinearGradient`.                                                                                                                          | \n| `safeArea`                | bool                 | If true, data is hidden behind the `embeddedImage`. Set to `QrEmbeddedImageStyle`.                                                                                                                  |\n| `safeAreaMultiplier`      | double               | Multiplier `safeArea` size.                                                                                                                                                                         |\n\n# Examples\n\nThere is a simple, working, example Flutter app in the `/example` directory. You can use it to play with all\nthe options. \n\nAlso, the following examples give you a quick overview on how to use the library.\n\nA basic QR code will look something like:\n\n```dart\nQrImageView(\n  data: 'This is a simple QR code',\n  version: QrVersions.auto,\n  size: 320,\n  gapless: false,\n)\n```\n\nA QR code with an image (from your application's assets) will look like:\n\n```dart\nQrImageView(\n  data: 'This QR code has an embedded image as well',\n  version: QrVersions.auto,\n  size: 320,\n  gapless: false,\n  embeddedImage: AssetImage('assets/images/my_embedded_image.png'),\n  embeddedImageStyle: QrEmbeddedImageStyle(\n    size: Size(80, 80),\n  ),\n)\n```\n\nTo show an error state in the event that the QR code can't be validated:\n\n```dart\nQrImageView(\n  data: 'This QR code will show the error state instead',\n  version: 1,\n  size: 320,\n  gapless: false,\n  errorStateBuilder: (cxt, err) {\n    return Container(\n      child: Center(\n        child: Text(\n          'Uh oh! Something went wrong...',\n          textAlign: TextAlign.center,\n        ),\n      ),\n    );\n  },\n)\n```\n\nA QR code with inside and outside corners rounding and safe area of embedded image:\n\n```dart\nQrImageView(\n  data: 'London is the capital of Great Britain',\n  version: QrVersions.auto,\n  size: 320,\n  eyeStyle: const QrEyeStyle(\n    borderRadius: 10,\n  ),\n  dataModuleStyle: const QrDataModuleStyle(\n    borderRadius: 5,\n    roundedOutsideCorners: true,\n  ),\n  embeddedImage: AssetImage('assets/images/my_embedded_image.png'),\n  embeddedImageStyle: QrEmbeddedImageStyle(\n    size: Size.square(40),\n    color: Colors.white,\n    safeArea: true,\n    safeAreaMultiplier: 1.1,\n    embeddedImageShape: EmbeddedImageShape.square,\n    borderRadius: 10,\n  ),\n)\n```\n\nA QR code with gradient:\n\n```dart\nQrImageView(\n  data: 'Rainbow after the rain',\n  version: QrVersions.auto,\n  size: 320,\n  gradient: LinearGradient(\n    begin: Alignment.bottomLeft,\n    end: Alignment.topRight,\n      colors: [\n      Color(0xffff0000),\n      Color(0xffffa500),\n      Color(0xffffff00),\n      Color(0xff008000),\n      Color(0xff0000ff),\n      Color(0xff4b0082),\n      Color(0xffee82ee),\n    ],\n  ),\n)\n```\n\n# Outro\n## Credits\nThanks to Kevin Moore for his awesome [QR - Dart](https://github.com/kevmoo/qr.dart) library. It's the core of this library.\n\nFor author/contributor information, see the `AUTHORS` file.\n\n## License\n\nQR.Flutter is released under a BSD-3 license. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheyakka%2Fqr.flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheyakka%2Fqr.flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheyakka%2Fqr.flutter/lists"}