[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9472":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":15,"starSnapshotCount":15,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},9472,"qr_code_scanner","juliuscanute\u002Fqr_code_scanner","juliuscanute","QR Code Scanner for Flutter",null,"Dart",1043,1094,15,188,0,57.12,"BSD 2-Clause \"Simplified\" License",false,"master",true,[],"2026-06-12 04:00:44","# Project in Maintenance Mode Only\n\nSince the underlying frameworks of this package, [zxing for android](https:\u002F\u002Fgithub.com\u002Fzxing\u002Fzxing) and [MTBBarcodescanner for iOS](https:\u002F\u002Fgithub.com\u002Fmikebuss\u002FMTBBarcodeScanner) are both not longer maintaned, this plugin is no longer up to date and in maintenance mode only. Only bug fixes and minor enhancements will be considered.\n\nI am developing a new plugin [mobile_scanner](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fmobile_scanner) that uses the latest version of MLKit for detecting barcodes and QR codes. On Android it also uses the latest version of CameraX, and on iOS the native AVFoundation for best camera performance. \n\n# QR Code Scanner\n\n[![pub package](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Fqr_code_scanner?include_prereleases)](https:\u002F\u002Fpub.dartlang.org\u002Fpackages\u002Fqr_code_scanner)\n[![Join the chat](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F829004904600961054)](https:\u002F\u002Fdiscord.gg\u002FaZujk84f6V)\n[![GH Actions](https:\u002F\u002Fgithub.com\u002Fjuliuscanute\u002Fqr_code_scanner\u002Fworkflows\u002Fdart\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fjuliuscanute\u002Fqr_code_scanner\u002Factions)\n\nA QR code scanner that works on both iOS and Android by natively embedding the platform view within Flutter. The integration with Flutter is seamless, much better than jumping into a native Activity or a ViewController to perform the scan.\n\n## Screenshots\n\u003Ctable>\n\u003Ctr>\n\u003Cth colspan=\"2\">\nAndroid\n\u003C\u002Fth>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Ctd>\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjuliuscanute\u002Fqr_code_scanner\u002Fmaster\u002F.resources\u002Fandroid-app-screen-one.jpg\" width=\"30%\" height=\"30%\">\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd>\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjuliuscanute\u002Fqr_code_scanner\u002Fmaster\u002F.resources\u002Fandroid-app-screen-two.jpg\" width=\"30%\" height=\"30%\">\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Cth colspan=\"2\">\niOS\n\u003C\u002Fth>\n\u003C\u002Ftr>\n\n\u003Ctr>\n\u003Ctd>\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjuliuscanute\u002Fqr_code_scanner\u002Fmaster\u002F.resources\u002Fios-app-screen-one.png\" width=\"30%\" height=\"30%\">\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003Ctd>\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjuliuscanute\u002Fqr_code_scanner\u002Fmaster\u002F.resources\u002Fios-app-screen-two.png\" width=\"30%\" height=\"30%\">\n\u003C\u002Fp>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\n\u003C\u002Ftable>\n\n## Get Scanned QR Code\n\nWhen a QR code is recognized, the text identified will be set in 'result' of type `Barcode`, which contains the output text as property 'code' of type `String` and scanned code type as property 'format' which is an enum `BarcodeFormat`, defined in the library.\n\n```dart\nclass _QRViewExampleState extends State\u003CQRViewExample> {\n  final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');\n  Barcode? result;\n  QRViewController? controller;\n\n  \u002F\u002F In order to get hot reload to work we need to pause the camera if the platform\n  \u002F\u002F is android, or resume the camera if the platform is iOS.\n  @override\n  void reassemble() {\n    super.reassemble();\n    if (Platform.isAndroid) {\n      controller!.pauseCamera();\n    } else if (Platform.isIOS) {\n      controller!.resumeCamera();\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Column(\n        children: \u003CWidget>[\n          Expanded(\n            flex: 5,\n            child: QRView(\n              key: qrKey,\n              onQRViewCreated: _onQRViewCreated,\n            ),\n          ),\n          Expanded(\n            flex: 1,\n            child: Center(\n              child: (result != null)\n                  ? Text(\n                      'Barcode Type: ${describeEnum(result!.format)}   Data: ${result!.code}')\n                  : Text('Scan a code'),\n            ),\n          )\n        ],\n      ),\n    );\n  }\n\n  void _onQRViewCreated(QRViewController controller) {\n    this.controller = controller;\n    controller.scannedDataStream.listen((scanData) {\n      setState(() {\n        result = scanData;\n      });\n    });\n  }\n\n  @override\n  void dispose() {\n    controller?.dispose();\n    super.dispose();\n  }\n}\n\n```\n\n## Android Integration\nIn order to use this plugin, please update the Gradle, Kotlin and Kotlin Gradle Plugin:\n\nIn ```android\u002Fbuild.gradle``` change ```ext.kotlin_version = '1.3.50'``` to ```ext.kotlin_version = '1.5.10'```\n\nIn ```android\u002Fbuild.gradle``` change ```classpath 'com.android.tools.build:gradle:3.5.0'``` to ```classpath 'com.android.tools.build:gradle:4.2.0'```\n\nIn ```android\u002Fgradle\u002Fwrapper\u002Fgradle-wrapper.properties``` change ```distributionUrl=https\\:\u002F\u002Fservices.gradle.org\u002Fdistributions\u002Fgradle-5.6.2-all.zip``` to ```distributionUrl=https\\:\u002F\u002Fservices.gradle.org\u002Fdistributions\u002Fgradle-6.9-all.zip```\n\nIn ```android\u002Fapp\u002Fbuild.gradle``` change \n```defaultConfig{```\n  ```...```\n  ```minSdkVersion 16```\n```}``` to \n```defaultConfig{```\n  ```...```\n  ```minSdkVersion 20```\n```}```\n\n### *Warning*\nIf you are using Flutter Beta or Dev channel (1.25 or 1.26) you can get the following error:\n\n`java.lang.AbstractMethodError: abstract method \"void io.flutter.plugin.platform.PlatformView.onFlutterViewAttached(android.view.View)\"`\n\nThis is a bug in Flutter which is being tracked here: https:\u002F\u002Fgithub.com\u002Fflutter\u002Fflutter\u002Fissues\u002F72185\n\nThere is a workaround by adding `android.enableDexingArtifactTransform=false` to your `gradle.properties` file.\n\n## iOS Integration\nIn order to use this plugin, add the following to your Info.plist file:\n```\n\u003Ckey>io.flutter.embedded_views_preview\u003C\u002Fkey>\n\u003Ctrue\u002F>\n\u003Ckey>NSCameraUsageDescription\u003C\u002Fkey>\n\u003Cstring>This app needs camera access to scan QR codes\u003C\u002Fstring>\n```\n\n## Web Integration\n\nAdd this to `web\u002Findex.html`:\n\n```html\n\u003Cscript src=\"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fjsqr@1.3.1\u002Fdist\u002FjsQR.min.js\">\u003C\u002Fscript>\n```\n\nPlease note: on web, only QR codes are supported. Other barcodes and 2D codes cannot be scanned.\n\nWeb support is in very early stage. Features such as flash, pause or resume are not implemented. Moreover, the camera \npreview does not respect the surrounding constraints. This is not at last due to Flutter's early state of platform views\non web.\n\n## Flip Camera (Back\u002FFront)\nThe default camera is the back camera.\n```dart\nawait controller.flipCamera();\n```\n\n## Flash (Off\u002FOn)\nBy default, flash is OFF.\n```dart\nawait controller.toggleFlash();\n```\n\n## Resume\u002FPause\nPause camera stream and scanner.\n```dart\nawait controller.pauseCamera();\n```\nResume camera stream and scanner.\n```dart\nawait controller.resumeCamera();\n```\n\n\n# SDK\nRequires at least SDK 20.\nRequires at least iOS 8.\n\n# TODOs\n* iOS Native embedding is written to match what is supported in the framework as of the date of publication of this package. It needs to be improved as the framework support improves.\n* In future, options will be provided for default states.\n* Finally, I welcome PR's to make it better :), thanks\n\n# Credits\n* Android: https:\u002F\u002Fgithub.com\u002Fzxing\u002Fzxing\n* iOS: https:\u002F\u002Fgithub.com\u002Fmikebuss\u002FMTBBarcodeScanner\n* Special Thanks To: LeonDevLifeLog for his contributions towards improving this package.\n","该项目是一个用于 Flutter 的二维码扫描器，支持在 iOS 和 Android 平台上无缝集成。它通过原生嵌入平台视图来实现与 Flutter 的平滑交互，避免了跳转到原生活动或视图控制器的不便。核心功能包括识别二维码并返回包含文本和格式信息的结果对象。虽然项目目前仅处于维护模式，但其稳定性和实用性使其非常适合需要在跨平台移动应用中快速集成二维码扫描功能的场景。",2,"2026-06-11 03:23:01","top_language"]