# flutter-barcode-plugin **Repository Path**: yushulx/flutter-barcode-plugin ## Basic Information - **Project Name**: flutter-barcode-plugin - **Description**: No description available - **Primary Language**: Objective-C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-08-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Flutter Barcode Plugin The sample demonstrates how to create a simple ``Flutter barcode plugin`` with [Dynamsoft Barcode Reader SDK for Android](https://www.dynamsoft.com/Products/barcode-scanner-sdk-android.aspx). ## Usage Download the source code: ``` git clone https://github.com/yushulx/flutter-barcode-plugin.git ``` Get a [free 30-day trial license](https://www.dynamsoft.com/CustomerPortal/Portal/Triallicense.aspx) and set it in ``demo\lib\main.dart``: ```dart Future initDynamsoftBarcodeReaderState() async { _barcodeReader = BarcodeReader(); await _barcodeReader.initLicense('LICENSE-KEY'); } ``` Read barcodes from an image file: ```dart await _controller.takePicture(path); String results = await _barcodeReader.decodeFile(path); ``` Build and run the app: **Android** ``` cd demo flutter run -d ``` **iOS** ``` cd demo/ios pod install cd .. flutter run -d ``` ![flutter barcode plugin](https://www.codepool.biz/wp-content/uploads/2019/08/flutter-barcode-plugin.png) ## Flutter Barcode Plugin for Android & iOS To edit and improve the plugin: **Android** Import ``barcode_reader/example/android`` to ``Android Studio``. **iOS** Import ``barcode_reader/example/ios/Runner.xcworkspace `` to ``Xcode``. ## Reference - https://flutter.dev/docs/development/packages-and-plugins/developing-packages - https://flutter.dev/docs/cookbook/plugins/picture-using-camera - https://pub.dev/packages/camera