{"id":15901539,"url":"https://github.com/amolgangadhare/flutter_barcode_scanner","last_synced_at":"2025-05-15T14:03:17.547Z","repository":{"id":39546053,"uuid":"174476226","full_name":"AmolGangadhare/flutter_barcode_scanner","owner":"AmolGangadhare","description":"Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS","archived":false,"fork":false,"pushed_at":"2024-08-13T01:56:43.000Z","size":495,"stargazers_count":391,"open_issues_count":227,"forks_count":581,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-15T03:51:56.858Z","etag":null,"topics":["android","barcode","barcode-scanner","barcodescanner","barcodescanninginflutter","dart","flutter","flutter-barcode-scanner","flutter-plugin","flutterbarcodescanner","fluttersdk","ios","scan","scanner","swift"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_barcode_scanner","language":"Java","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/AmolGangadhare.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/AmolGangadhareIN","https://www.buymeacoffee.com/AmolGangadhare"]}},"created_at":"2019-03-08T05:42:21.000Z","updated_at":"2025-03-21T10:57:20.000Z","dependencies_parsed_at":"2024-01-17T05:14:03.591Z","dependency_job_id":"60e12ae1-5882-4107-b687-1dedcbcee600","html_url":"https://github.com/AmolGangadhare/flutter_barcode_scanner","commit_stats":{"total_commits":85,"total_committers":10,"mean_commits":8.5,"dds":0.6352941176470588,"last_synced_commit":"c466d32d017c29cd34307b5681f697891c55babc"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmolGangadhare%2Fflutter_barcode_scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmolGangadhare%2Fflutter_barcode_scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmolGangadhare%2Fflutter_barcode_scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmolGangadhare%2Fflutter_barcode_scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmolGangadhare","download_url":"https://codeload.github.com/AmolGangadhare/flutter_barcode_scanner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003954,"owners_count":21196794,"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":["android","barcode","barcode-scanner","barcodescanner","barcodescanninginflutter","dart","flutter","flutter-barcode-scanner","flutter-plugin","flutterbarcodescanner","fluttersdk","ios","scan","scanner","swift"],"created_at":"2024-10-06T11:04:56.703Z","updated_at":"2025-04-15T03:52:01.758Z","avatar_url":"https://github.com/AmolGangadhare.png","language":"Java","funding_links":["https://www.paypal.me/AmolGangadhareIN","https://www.buymeacoffee.com/AmolGangadhare"],"categories":[],"sub_categories":[],"readme":"# flutter_barcode_scanner\n\nA plugin for Flutter apps that adds barcode scanning support on both Android and iOS.\n\n[![pub package](https://img.shields.io/pub/v/flutter_barcode_scanner.svg)](https://pub.dartlang.org/packages/flutter_barcode_scanner)\n\n![Demo gif](https://github.com/AmolGangadhare/MyProfileRepo/blob/master/flutter_barcode_scanning_demo.gif \"Demo\")\n\n\n## Try example\nJust clone or download the repository, open the project in `Android Studio/ VS Code`, open `pubspec.yaml` and click on `Packages get`.\nConnect device and hit `run`. \nTo run on iPhone you need to run from Xcode first time and just make `pod install` in `example/ios` then run from Xcode.\n\n## Getting Started \nFollow the steps for Android and iOS\n\nPLEASE FOLLOW **iOS** STEPS CAREFULLY\n\n### Android\n\n:zap:  Don't worry, you don't need to do anything.\n\n### iOS - Requires Swift support\n\nDeployment target : 12\n\n#### 1. Fresh start: \n 1. Create a new flutter project. Please check for **Include swift support for iOS code**.\n 2. After creating new flutter project open `/ios` project in Xcode and set minimum **deployment target to 12**\n    and set **Swift version to 5**.\n 3. After setting up the deployment target and swift version, close the Xcode then run **pod install** in `/ios` in flutter project.\n \n You have done with basic configuration now proceed to section **How to use**.\n \n#### 2. Adding to existing flutter app: \n#### If your existing ios code is **Swift** then you just need to do following.\n  1. Set **minimum deployment target to 12** and set **Swift version to 5**.\n  2. Close the Xcode and run **pod install** in `/ios` in flutter project.\n  3. Now proceed to section **How to use**.\n \n#### If your existing ios code is **Objective-C** then you need to do following.\n  1. Create a new flutter project with same name at different location (Don't forget to check **Include swift support for iOS code** while creating) \n  2. Just copy newly created `/ios` folder from project and replace with existing `/ios`.\n  3. Open ios project in Xcode and set **minimum deployment target to 12** and set **Swift version to 5**.\n  4. Run **pod install** in `/ios` \n    \n**Note: If you did any changes in ios part before, you might need to make these configuration again**\n\n## How to use ?\n\nTo use on iOS, you will need to add the camera usage description.\nTo do that open the Xcode and add camera usage description in `Info.plist`. \n\n```\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003eCamera permission is required for barcode scanning.\u003c/string\u003e\n```\n\n\nAfter making the changes in Android ans iOS add flutter_barcode_scanner to `pubspec.yaml`\n```  \ndependencies:\n  ...\n  flutter_barcode_scanner: ^2.0.0\n```\n\n### One time scan\n1. You need to import the package first.\n\n```\nimport 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';\n```\n\n    \n2. Then use the `scanBarcode` method to access barcode scanning.\n    \n```\nString barcodeScanRes = await FlutterBarcodeScanner.scanBarcode(\n                                                    COLOR_CODE, \n                                                    CANCEL_BUTTON_TEXT, \n                                                    isShowFlashIcon, \n                                                    scanMode);\n```\n\nHere in `scanBarcode`,\n\n `COLOR_CODE` is hex-color which is the color of line in barcode overlay you can pass color of your choice,\n \n `CANCEL_BUTTON_TEXT` is a text of cancel button on screen you can pass text of your choice and language,\n \n `isShowFlashIcon` is bool value used to show or hide the flash icon,\n \n `scanMode` is a enum in which user can pass any of `{ QR, BARCODE, DEFAULT }`, if nothing is passed it will consider a default value which will be `QR`.\n It shows the graphics overlay like for barcode and QR.\n \n NOTE: Currently, `scanMode` is just to show the graphics overlay for barcode and QR. Any of this mode selected will scan both QR and barcode. \n\n### Continuous scan\n* If you need to scan barcodes continuously without closing camera use `FlutterBarcodeScanner.getBarcodeStreamReceiver`\nparams will be same like `FlutterBarcodeScanner.scanBarcode`\ne.g. \n\n\n```\nFlutterBarcodeScanner.getBarcodeStreamReceiver(\"#ff6666\", \"Cancel\", false, ScanMode.DEFAULT)\n         .listen((barcode) { \n         /// barcode to be used\n         });\n```\n\n### Contribution:\n\nwould :heart: to see any contribution, give :star:  if you like\n\n### Contact:\n\n\n\u003cp\u003e\n\u003ca href=\"https://github.com/AmolGangadhare\"\u003e\u003cimg src=\"https://github.com/AmolGangadhare/MyProfileRepo/blob/master/git_hub_logo.png\" width=\"32\" height=\"33\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://stackoverflow.com/users/9823185/amol-gangadhare\" rel=\"nofollow\"\u003e\u003cimg src=\"https://github.com/AmolGangadhare/MyProfileRepo/blob/master/stack_o_logo.svg\" width=\"36\" height=\"36\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.linkedin.com/in/amolgangadhare/\" rel=\"nofollow\"\u003e\u003cimg src=\"https://github.com/AmolGangadhare/MyProfileRepo/blob/master/linked_in_logo.svg\" width=\"36\" height=\"36\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nE-mail: amol.gangadhare@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famolgangadhare%2Fflutter_barcode_scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famolgangadhare%2Fflutter_barcode_scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famolgangadhare%2Fflutter_barcode_scanner/lists"}