{"id":15998054,"url":"https://github.com/yushulx/flutter_barcode_sdk","last_synced_at":"2026-03-08T05:34:28.961Z","repository":{"id":42976573,"uuid":"357806121","full_name":"yushulx/flutter_barcode_sdk","owner":"yushulx","description":"Build barcode QR detection apps for Windows, Linux, macOS, Android, iOS and web.","archived":false,"fork":false,"pushed_at":"2026-02-09T09:57:36.000Z","size":202371,"stargazers_count":51,"open_issues_count":0,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-16T20:48:30.296Z","etag":null,"topics":["android","barcode","datamatrix","flutter","ios","linux","macos","pdf417","qrcode","web","windows"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_barcode_sdk","language":"C++","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/yushulx.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-14T07:00:26.000Z","updated_at":"2026-02-09T09:56:49.000Z","dependencies_parsed_at":"2025-03-16T16:11:18.473Z","dependency_job_id":"55e70429-5cdf-4758-942a-9075dac01ea2","html_url":"https://github.com/yushulx/flutter_barcode_sdk","commit_stats":{"total_commits":148,"total_committers":3,"mean_commits":"49.333333333333336","dds":0.04054054054054057,"last_synced_commit":"878da6edd00e74c267f807f15e0ab0f4e596dcd3"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/yushulx/flutter_barcode_sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fflutter_barcode_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fflutter_barcode_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fflutter_barcode_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fflutter_barcode_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yushulx","download_url":"https://codeload.github.com/yushulx/flutter_barcode_sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yushulx%2Fflutter_barcode_sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","barcode","datamatrix","flutter","ios","linux","macos","pdf417","qrcode","web","windows"],"created_at":"2024-10-08T08:06:55.282Z","updated_at":"2026-03-08T05:34:23.949Z","avatar_url":"https://github.com/yushulx.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_barcode_sdk\n![pub.dev](https://img.shields.io/pub/v/flutter_barcode_sdk.svg)\n\nThe **Flutter Barcode SDK** is a wrapper for the [Dynamsoft Barcode Reader SDK](https://www.dynamsoft.com/barcode-reader/overview/). It supports multiple platforms, including **Android**, **iOS**, **Web**, **Windows**, **Linux** and **macOS**, and can decode various barcode types such as linear barcodes, QR Code, DataMatrix, MaxiCode, PDF417, and more. This SDK encapsulates the low-level decoding functions of the Dynamsoft Barcode Reader, enabling both file and image buffer decoding. It empowers developers to effortlessly build 1D/2D barcode readers and scanners. The project is actively maintained by community contributors.\n\n\u003e **Note:** For live camera scenarios, it is recommended to use the official [Dynamsoft Capture Vision Flutter Edition](https://pub.dev/packages/dynamsoft_capture_vision_flutter), as it offers better performance than combining the [Flutter camera plugin](https://pub.dev/packages/camera) with the Flutter Barcode SDK.\n\n## **Table of Contents**\n1. [Getting a License Key](#getting-a-license-key)\n2. [Supported Platforms](#supported-platforms)\n3. [Supported Barcode Symbologies](#supported-barcode-symbologies)\n4. [Build Configuration](#build-configuration)\n5. [API Compatibility](#api-compatibility)\n6. [Usage](#usage)\n7. [Examples](#try-barcode-decoding-example)\n\n## **Getting a License Key**\n[![](https://img.shields.io/badge/Get-30--day%20FREE%20Trial-blue)](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv\u0026package=cross-platform)\n\n## **Supported Platforms**\n- **Android**\n- **iOS**\n- **Windows**\n- **Linux**\n- **macOS**\n- **Web**\n\n## **Supported Barcode Symbologies**\n### **Linear Barcodes (1D)**\n- Code 39 (including Code 39 Extended)\n- Code 93\n- Code 128\n- Codabar\n- Interleaved 2 of 5\n- EAN-8\n- EAN-13\n- UPC-A\n- UPC-E\n- Industrial 2 of 5\n\n### **2D Barcodes**\n- QR Code (including Micro QR Code and Model 1)\n- Data Matrix\n- PDF417 (including Micro PDF417)\n- Aztec Code\n- MaxiCode (mode 2-5)\n- DotCode\n\n### **Others**\n- Patch Code\n- GS1 Composite Code\n- GS1 DataBar\n  - Omnidirectional,\n  - Truncated, Stacked, Stacked\n  - Omnidirectional, Limited,\n  - Expanded, Expanded Stacked\n\n- Postal Codes\n  - USPS Intelligent Mail\n  - Postnet\n  - Planet\n  - Australian Post\n  - UK Royal Mail\n\n## **Build Configuration**\n\n### Android\nSet the minimum SDK version in `android/app/build.gradle`.\n\n```\nminSdkVersion 21\n```\n\n### iOS\nAdd camera usage descriptions to `ios/Runner/Info.plist`:\n\n```\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003eCan I use the camera please?\u003c/string\u003e\n\u003ckey\u003eNSMicrophoneUsageDescription\u003c/key\u003e\n\u003cstring\u003eCan I use the mic please?\u003c/string\u003e\n```\n\n### Desktop\n\n**Windows \u0026 Linux**\n\nInstall `CMake` and `platform-specific C++ compiler`.\n\n**macOS**\n\nInstall `Xcode`.\n\nTo make the demo app work on macOS:\n- Disable `com.apple.security.app-sandbox` and enable `com.apple.security.files.user-selected.read-write` in `example/macos/Runner/DebugProfile.entitlements`:\n    \n  ```xml\n  \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n  \u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n  \u003cplist version=\"1.0\"\u003e\n  \u003cdict\u003e\n    \u003ckey\u003ecom.apple.security.app-sandbox\u003c/key\u003e\n    \u003cfalse/\u003e\n    \u003ckey\u003ecom.apple.security.cs.allow-jit\u003c/key\u003e\n    \u003ctrue/\u003e\n    \u003ckey\u003ecom.apple.security.network.server\u003c/key\u003e\n    \u003ctrue/\u003e\n    \u003ckey\u003ecom.apple.security.files.user-selected.read-write\u003c/key\u003e\n    \u003ctrue/\u003e\n  \u003c/dict\u003e\n  \u003c/plist\u003e\n  ```    \n\n- If `DCV` package is not found, run the command:\n\n  ```bash\n  pod repo add master https://github.com/CocoaPods/Specs\n  ```\n  The command manually adds the CocoaPods `master` spec repository to the local machine to resolve the issue.\n\n### Web\nIn `index.html`, include:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-bundle@2.6.1000/dist/dcv.bundle.min.js\"\u003e\u003c/script\u003e\n```\n\n## **API Compatibility**\n| Methods      | Android |    iOS | Windows | Linux | macOS | Web|\n| ----------- | ----------- | ----------- | ----------- |----------- |----------- |----------- |\n| `Future\u003cvoid\u003e setLicense(String license) async`     | :heavy_check_mark:       | :heavy_check_mark:   | :heavy_check_mark:      | :heavy_check_mark:      |:heavy_check_mark:      | :heavy_check_mark:    |\n| `Future\u003cList\u003cBarcodeResult\u003e\u003e decodeFile(String filename) async`     | :heavy_check_mark:      | :heavy_check_mark:   | :heavy_check_mark:      |:heavy_check_mark:      | :heavy_check_mark:     |:heavy_check_mark:      |\n| `Future\u003cList\u003cBarcodeResult\u003e\u003e decodeImageBuffer(Uint8List bytes, int width, int height, int stride, int format) async`     | :heavy_check_mark:      | :heavy_check_mark:   | :heavy_check_mark:      |:heavy_check_mark:      | :heavy_check_mark:     |:heavy_check_mark:    |\n| `Future\u003cint\u003e setBarcodeFormats(int formats) async`     | :heavy_check_mark:       | :heavy_check_mark:   | :heavy_check_mark:       | :heavy_check_mark:       |:heavy_check_mark:      | :heavy_check_mark:     |\n| `Future\u003cString\u003e getParameters() async`     | :heavy_check_mark:         | :heavy_check_mark:   | :heavy_check_mark:       | :heavy_check_mark:        |:heavy_check_mark:       | :heavy_check_mark:     |\n| `Future\u003cint\u003e setParameters(String params)` async | :heavy_check_mark:         |:heavy_check_mark:   | :heavy_check_mark:       | :heavy_check_mark:        |:heavy_check_mark:      | :heavy_check_mark:     |\n| `Future\u003cvoid\u003e init()` async | :heavy_check_mark:         |:heavy_check_mark:   | :heavy_check_mark:       | :heavy_check_mark:        |:heavy_check_mark:      | :heavy_check_mark:     |\n\n## **Usage**\n- Initialize Flutter barcode SDK and set the license key:\n    \n  ```dart\n  _barcodeReader = FlutterBarcodeSdk();\n  await _barcodeReader.setLicense('LICENSE-KEY');\n  await _barcodeReader.init();\n  ```\n\n- Read barcodes from an image file:\n\n  ```dart\n  List\u003cBarcodeResult\u003e results = await _barcodeReader.decodeFile(image-path);\n  ```\n\n- Read barcodes from an image buffer:\n\n\n  ```dart\n  import 'dart:ui' as ui;\n  Uint8List fileBytes = await file.readAsBytes();\n  ui.Image image = await decodeImageFromList(fileBytes);\n\n  ByteData byteData = await image.toByteData(\n      format: ui.ImageByteFormat.rawRgba);\n  List\u003cBarcodeResult\u003e results =\n      await _barcodeReader.decodeImageBuffer(\n          byteData.buffer.asUint8List(),\n          image.width,\n          image.height,\n          byteData.lengthInBytes ~/ image.height,\n          ImagePixelFormat.IPF_ARGB_8888.index);\n  ```\n\n- Set barcode formats:\n\n  ```dart\n  int ret = await _barcodeReader.setBarcodeFormats(BarcodeFormat.CODE_39 | BarcodeFormat.CODABAR | BarcodeFormat.QR_CODE | BarcodeFormat.DATAMATRIX);\n  ```\n\n- Get current barcode detection parameters:\n    \n  ```dart\n  String params = await _barcodeReader.getParameters();\n  ```\n\n- Set barcode detection parameters:\n    \n  ```dart\n  int ret = await _barcodeReader.setParameters(params);\n  ```\n\n\n## **Try Barcode Decoding Example**\n\n### Android/iOS\nThe example demonstrates how to use the Flutter Barcode SDK to read barcodes from an image file and decode the barcode image buffer from the camera stream on Android and iOS.\n\n```\ncd example\nflutter run -d \u003cdevice\u003e\n```\n\n- **Barcode Scanner**\n\n    ![flutter barcode scanner](https://www.dynamsoft.com/codepool/img/2025/01/flutter-android-barcode-scanner.jpg)\n\n- **Barcode Reader**\n\n    ![flutter barcode reader](https://www.dynamsoft.com/codepool/img/2025/01/flutter-android-barcode-image-detection.jpg)\n\n\n### Windows, Linux and macOS\nRun the desktop barcode reader and scanner application on Windows, Linux or macOS:\n\n```bash\ncd example\n# Windows\nflutter run -d windows\n\n# Linux\nflutter run -d linux\n\n# macOS\nflutter run -d macos\n```\n\n- **Barcode Reader**\n\n    ![flutter desktop barcode reader](https://www.dynamsoft.com/codepool/img/2025/01/flutter-barcode-reader-windows-linux-macos.png)\n\n- **Barcode Scanner**\n\n    ![flutter desktop barcode scanner](https://www.dynamsoft.com/codepool/img/2025/01/flutter-barcode-scanner-windows-linux-macos.png)\n\n\n### Web Browser\n\n```bash\ncd example\nflutter run -d chrome\n```\n\n![flutter web barcode reader](https://www.dynamsoft.com/codepool/img/2025/01/flutter-barcode-scanner-web.png)\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fflutter_barcode_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyushulx%2Fflutter_barcode_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyushulx%2Fflutter_barcode_sdk/lists"}