{"id":16950707,"url":"https://github.com/facundomedica/fast_qr_reader_view","last_synced_at":"2025-04-05T08:08:38.764Z","repository":{"id":48613994,"uuid":"141615031","full_name":"facundomedica/fast_qr_reader_view","owner":"facundomedica","description":"A Fast QR Reader widget for Flutter. For both Android and iOS","archived":false,"fork":false,"pushed_at":"2021-07-18T00:08:25.000Z","size":4277,"stargazers_count":293,"open_issues_count":14,"forks_count":161,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T07:08:31.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/facundomedica.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}},"created_at":"2018-07-19T18:07:47.000Z","updated_at":"2025-03-07T05:37:42.000Z","dependencies_parsed_at":"2022-08-26T13:51:02.785Z","dependency_job_id":null,"html_url":"https://github.com/facundomedica/fast_qr_reader_view","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facundomedica%2Ffast_qr_reader_view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facundomedica%2Ffast_qr_reader_view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facundomedica%2Ffast_qr_reader_view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facundomedica%2Ffast_qr_reader_view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facundomedica","download_url":"https://codeload.github.com/facundomedica/fast_qr_reader_view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"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":[],"created_at":"2024-10-13T21:58:21.247Z","updated_at":"2025-04-05T08:08:38.738Z","avatar_url":"https://github.com/facundomedica.png","language":"Java","funding_links":[],"categories":["插件","Device [🔝](#readme)","Plugins"],"sub_categories":["扫码器","设备","Device"],"readme":"# Fast QR Reader View Plugin\n\n**[See in pub](https://pub.dartlang.org/packages/fast_qr_reader_view)**\n\nA Flutter plugin for iOS and Android allowing access to the device cameras to scan multiple type of codes (QR, PDF417, CODE39, etc). **Heavily based on [camera](https://pub.dartlang.org/packages/camera)**\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/facundomedica/fast_qr_reader_view/master/example.gif\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/facundomedica/fast_qr_reader_view/master/example2.gif\"\u003e\n\u003c/p\u003e\n\n*Red box is a Flutter animation (removable).* *Low FPS due to GIF*\n\n## Features:\n\n* Display live camera preview in a widget.\n* Uses native AVFoundation code detection in iOS\n* Uses ML Kit in Android\n\n## Installation\n\nFirst, add `fast_qr_reader_view` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).\n\n### iOS\n\nAdd a row to the `ios/Runner/Info.plist` with the key `Privacy - Camera Usage Description` and a usage description.\n\nOr in text format add the key:\n\n```xml\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003eCan I use the camera please?\u003c/string\u003e\n```\n\n### Android\n\nChange the minimum Android sdk version to 21 (or higher) in your `android/app/build.gradle` file.\n\n```\nminSdkVersion 21\n```\n\n### Example\n\nHere is a small example flutter app displaying a full screen camera preview.\n\n```dart\nimport 'dart:async';\nimport 'package:flutter/material.dart';\nimport 'package:fast_qr_reader_view/fast_qr_reader_view.dart';\n\nList\u003cCameraDescription\u003e cameras;\n\nFuture\u003cNull\u003e main() async {\n  cameras = await availableCameras();\n  runApp(new CameraApp());\n}\n\nclass CameraApp extends StatefulWidget {\n  @override\n  _CameraAppState createState() =\u003e new _CameraAppState();\n}\n\nclass _CameraAppState extends State\u003cCameraApp\u003e {\n  QRReaderController controller;\n\n  @override\n  void initState() {\n    super.initState();\n    controller = new QRReaderController(cameras[0], ResolutionPreset.medium, [CodeFormat.qr], (dynamic value){\n        print(value); // the result!\n    // ... do something\n    // wait 3 seconds then start scanning again.\n    new Future.delayed(const Duration(seconds: 3), controller.startScanning);\n    });\n    controller.initialize().then((_) {\n      if (!mounted) {\n        return;\n      }\n      setState(() {});\n      controller.startScanning();\n    });\n  }\n\n  @override\n  void dispose() {\n    controller?.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (!controller.value.isInitialized) {\n      return new Container();\n    }\n    return new AspectRatio(\n        aspectRatio:\n        controller.value.aspectRatio,\n        child: new QRReaderPreview(controller));\n  }\n}\n```\n\nFor a more elaborate usage example see [here](https://github.com/facundomedica/fast_qr_reader_view/tree/master/example).\n\n*Note*: This plugin is still under development, and some APIs might not be available yet.\n[Feedback welcome](https://github.com/facundomedica/fast_qr_reader_view/issues) and\n[Pull Requests](https://github.com/facundomedica/fast_qr_reader_view/pulls) are most welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacundomedica%2Ffast_qr_reader_view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacundomedica%2Ffast_qr_reader_view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacundomedica%2Ffast_qr_reader_view/lists"}