{"id":21072000,"url":"https://github.com/khoren93/flutter_zxing","last_synced_at":"2025-04-13T11:47:53.128Z","repository":{"id":38099321,"uuid":"472074535","full_name":"khoren93/flutter_zxing","owner":"khoren93","description":"Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms","archived":false,"fork":false,"pushed_at":"2025-04-01T08:10:17.000Z","size":9362,"stargazers_count":107,"open_issues_count":45,"forks_count":62,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-04T05:46:56.759Z","etag":null,"topics":["barcode","barcode-generator","barcode-scanner","flutter","generator","qr","qrcode","qrcode-generator","qrcode-scanner","scanner","zxing","zxscanner"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_zxing","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khoren93.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-20T18:57:08.000Z","updated_at":"2025-03-14T06:49:53.000Z","dependencies_parsed_at":"2024-01-01T04:50:21.948Z","dependency_job_id":"aa3fed28-1ebe-47b5-95fa-2efbccc7e720","html_url":"https://github.com/khoren93/flutter_zxing","commit_stats":{"total_commits":296,"total_committers":12,"mean_commits":"24.666666666666668","dds":"0.21621621621621623","last_synced_commit":"f987a914c90def5ab9186aca2b83fa2a23e8e1b1"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoren93%2Fflutter_zxing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoren93%2Fflutter_zxing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoren93%2Fflutter_zxing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khoren93%2Fflutter_zxing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khoren93","download_url":"https://codeload.github.com/khoren93/flutter_zxing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710409,"owners_count":21149186,"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":["barcode","barcode-generator","barcode-scanner","flutter","generator","qr","qrcode","qrcode-generator","qrcode-scanner","scanner","zxing","zxscanner"],"created_at":"2024-11-19T18:55:22.195Z","updated_at":"2025-04-13T11:47:53.108Z","avatar_url":"https://github.com/khoren93.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter ZXing\n\nFlutter ZXing is a high-performance Flutter plugin for scanning and generating QR codes and barcodes. Built on the powerful [ZXing C++ library](https://github.com/zxing-cpp/zxing-cpp), it provides fast and reliable barcode processing capabilities for Flutter applications. Whether you need to scan barcodes from the camera or generate custom QR codes, Flutter ZXing makes it seamless and efficient.\n\n---\n\n## Table of Contents\n\n- [Flutter ZXing](#flutter-zxing)\n  - [Table of Contents](#table-of-contents)\n  - [Demo Screenshots](#demo-screenshots)\n  - [Features](#features)\n  - [Supported Formats](#supported-formats)\n  - [Supported Platforms](#supported-platforms)\n  - [ZXScanner](#zxscanner)\n    - [Features](#features-1)\n    - [Try ZXScanner](#try-zxscanner)\n  - [Getting Started](#getting-started)\n    - [Cloning the flutter\\_zxing project](#cloning-the-flutter_zxing-project)\n    - [Installing dependencies](#installing-dependencies)\n  - [Usage](#usage)\n    - [To read barcode](#to-read-barcode)\n    - [To create barcode](#to-create-barcode)\n  - [License](#license)\n\n---\n\n## Demo Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Scanner Screen\" src=\"https://user-images.githubusercontent.com/11523360/222677044-a15841a7-e617-44bb-b3a0-66b2d5b57dce.png\" width=\"240\"\u003e\n  \u003cimg alt=\"Creator Screen\" src=\"https://user-images.githubusercontent.com/11523360/222677058-60a676fd-c229-4b51-8780-f40155cb5db6.png\" width=\"240\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eLeft: Barcode Scanner, Right: QR Code Creator\u003c/i\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n- Scan QR codes and barcodes from the camera stream (on mobile platforms only), image file, or URL.\n- Scan multiple barcodes at once from the camera stream (on mobile platforms only), image file, or URL.\n- Generate QR codes with customizable content and size.\n- Return the position points of the scanned barcode.\n- Customizable scanner frame size and color, and the ability to enable or disable features like torch and pinch to zoom.\n\n---\n\n## Supported Formats\n\n| Linear product | Linear industrial | Matrix             |\n|----------------|-------------------|--------------------|\n| UPC-A          | Code 39           | QR Code            |\n| UPC-E          | Code 93           | Micro QR Code      |\n| EAN-8          | Code 128          | rMQR Code          |\n| EAN-13         | Codabar           | Aztec              |\n| DataBar        | DataBar Expanded  | DataMatrix         |\n|                | ITF               | PDF417             |\n|                |                   | MaxiCode (partial) |\n\n---\n\n## Supported Platforms\n\n| Platform   | Status               | Notes                                     |\n|------------|----------------------|-------------------------------------------|\n| Android    | ✅ Fully Supported   | Minimum API level 21                     |\n| iOS        | ✅ Fully Supported   | Minimum iOS 11.0                         |\n| MacOS      | ⚠️ Beta             | Minimum macOS 10.15                      |\n| Linux      | ⚠️ Beta             | No camera support                        |\n| Windows    | ⚠️ Beta             | No camera support                        |\n| Web        | ❌ Not Supported    | Dart FFI is not available on the web     |\n\n\u003e Note: Flutter ZXing relies on the Dart FFI feature, making it unsupported on the web. Camera-based scanning is only available on mobile platforms.\n\n---\n\n\n## ZXScanner\n\nZXScanner is a free QR code and barcode scanner app for Android and iOS. It is built using Flutter and the [flutter_zxing](https://github.com/khoren93/flutter_zxing) plugin.\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/khoren93/flutter_zxing/tree/main/zxscanner\"\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/11523360/178162663-57ec28ac-7075-43ab-ac31-35058298c73e.png\" alt=\"ZXScanner logo\" height=\"100\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n### Features\n- Fast and reliable QR code and barcode scanning.\n- Built-in support for multiple barcode formats.\n- Fully open-source and customizable.\n\n### Try ZXScanner\nTo learn more or contribute, visit the [ZXScanner repository](https://github.com/khoren93/flutter_zxing/tree/main/zxscanner).\n\n## Getting Started\n\n### Cloning the flutter_zxing project\n\nTo clone the flutter_zxing project from Github which includes submodules, use the following command:\n\n```bash\ngit clone --recursive https://github.com/khoren93/flutter_zxing.git\n```\n\n### Installing dependencies\n\nUse Melos to install the dependencies of the flutter_zxing project. Melos is a tool that helps you manage multiple Dart packages in a single repository. To install Melos, use the following command:\n\n```bash\nflutter pub global activate melos\n```\n\nTo install the dependencies of the flutter_zxing project, use the following command:\n\n```bash\nmelos bootstrap\n```\n\nTo allow the building on iOS and MacOS, you need to run the following command:\n\n```bash\n./scripts/update_ios_macos_src.sh\n```\n\nTo run the integration tests:\n\n```bash\ncd example\nflutter test integration_test\n```\n\nNow you can run the flutter_zxing example app on your device or emulator.\n\n## Usage\n\n### To read barcode\n\n```dart\nimport 'package:flutter_zxing/flutter_zxing.dart';\n\n// Use ReaderWidget to quickly read barcode from camera image\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    body: ReaderWidget(\n      onScan: (result) async {\n        // Do something with the result\n      },\n    ),\n  );\n}\n\n// Or use flutter_zxing plugin methods \n// To read barcode from camera image directly\nawait zx.startCameraProcessing(); // Call this in initState\n\ncameraController?.startImageStream((image) async {\n    Code result = await zx.processCameraImage(image);\n    if (result.isValid) {\n        debugPrint(result.text);\n    }\n    return null;\n});\n\nzx.stopCameraProcessing(); // Call this in dispose\n\n// To read barcode from XFile, String, url or Uint8List bytes\nXFile xFile = XFile('Your image path');\nCode? resultFromXFile = await zx.readBarcodeImagePath(xFile);\n\nString path = 'Your local image path';\nCode? resultFromPath = await zx.readBarcodeImagePathString(path);\n\nString url = 'Your remote image url';\nCode? resultFromUrl = await zx.readBarcodeImageUrl(url);\n\nUint8List bytes = Uint8List.fromList(yourImageBytes);\nCode? resultFromBytes = await zx.readBarcode(bytes);\n```\n\n### To create barcode\n\n```dart\nimport 'package:flutter_zxing/flutter_zxing.dart';\nimport 'dart:typed_data';\nimport 'package:image/image.dart' as imglib;\n\n// Use WriterWidget to quickly create barcode\n@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    body: WriterWidget(\n      onSuccess: (result, bytes) {\n        // Do something with the result\n      },\n      onError: (error) {\n        // Do something with the error\n      },\n    ),\n  );\n}\n\n// Or use FlutterZxing to create barcode directly\nfinal Encode result = zx.encodeBarcode(\n    contents: 'Text to encode',\n    params: EncodeParams(\n        format: Format.QRCode,\n        width: 120,\n        height: 120,\n        margin: 10,\n        eccLevel: EccLevel.low,\n    ),\n);\nif (result.isValid) {\n    final img = imglib.Image.fromBytes(width, height, result.data);\n    final encodedBytes = Uint8List.fromList(imglib.encodeJpg(img));\n    // use encodedBytes as you wish\n}\n```\n\n## License\n\nMIT License. See [LICENSE](https://github.com/khoren93/flutter_zxing/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhoren93%2Fflutter_zxing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhoren93%2Fflutter_zxing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhoren93%2Fflutter_zxing/lists"}