在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):rmtmckenzie/flutter_qr_mobile_vision开源软件地址(OpenSource Url):https://github.com/rmtmckenzie/flutter_qr_mobile_vision开源编程语言(OpenSource Language):Java 60.4%开源软件介绍(OpenSource Introduction):QR Mobile VisionReading QR codes and other barcodes using Firebase's MLKit. This plugin uses Android & iOS native APIs for reading images from the device's camera. It then pipes these images both to the MLKit Vision Barcode API which detects barcodes/qrcodes etc, and outputs a preview image to be shown on a flutter texture. The plugin includes a widget which performs all needed transformations on the camera output to show within the defined area. Android ModelsWith this new version of MLKit, there are two seperate models you can use to do the barcode scanning. Currently, this apk chooses to use the build-in model. This will increase your code size by ~2.2MB but will result in better scanning and won't require a seperate package to be downloaded in the background for barcode scanning to work properly. You could also use the Google Play Services and tell your app to download it on install from the play store. See the instruction on the ml-kit barcode-scanning documentation page for android. You would also have to remove the com.google.mlkit:barcode-scanning dependency; this hasn't been tested but would probably go something like this:
Note that if you do this, you should tell your app to automatically download the model as in the above linked docs.MLKit
If this doesn't work for you please open an issue. 64 Bit Only on iOSUnfortunately, Google has only released MLKit as a 64 bit binary. That means that this plugin and therefore your app don't support building or running on 32 bit. There were two possible approaches to dealing with this, but only one made it so that most users will be able to use the plugin easily.app When you upgrade, if you are targeting a version of iOS before 11, you'll see a warning during the The easy way to solve this is by updating to build for iOS 11 and later. To do this:
Building for 64-bit before 11.0.If you absolutely need to build for devices before 11.0, you might need to use an old version of the library that supports
32-bit. If you're willing to live without 32 bit but do need to target before 11.0, you can do that by ignoring the warning
CocoaPods will give you, and setting XCode -> Runner -> Build Settings -> Architectures -> Architectures to UsageSee the example for how to use this plugin; it is the best resource available as it shows the plugin in use. However, these are the steps you need to take to use this plugin. First, figure out the area that you want the camera preview to be shown in. This is important as the preview needs to have a constrained size or it won't be able to build. This is required due to the complex nature of the transforms needed to get the camera preview to show correctly on both iOS and Android, while still working with the screen rotated etc. It may be possible to get the camera preview to work without putting it in a SizedBox or Container, but the recommended way is to put it in a SizedBox or Container. You then need to include the package and instantiate the camera.
The QrCodeCallback can do anything you'd like, and wil keep receiving QR codes until the camera is stopped. There are also optional parameters to QrCamera.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论