Open hhzhangzy opened 6 months ago
Can you clarify what you mean? Is BarcodeType.product
never reported for barcodes that have the product type?
I need detailed testing on my end, but I'm not sure how to receive this type of return? is barcodes.rawValue? for example, BarcodeType.sms, use barcodes.sms receive data.
------------------ Original ------------------ From: Navaron Bracke @.> Date: Fri,Apr 26,2024 7:03 PM To: juliansteenbakker/mobile_scanner @.> Cc: hhzhangzy @.>, Author @.> Subject: Re: [juliansteenbakker/mobile_scanner] 4.0.1 Version not Barcode Type'Product' (Issue #1044)
Can you clarify what you mean? Is BarcodeType.product never reported for barcodes that have the product type?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
The rawValue
of the barcode is indeed what is received by MLKit. You'll have to create a barcode which definitely has an SMS value in it. For example on the qr.io
website, you can create SMS QR codes to test with.
The
rawValue
of the barcode is indeed what is received by MLKit. You'll have to create a barcode which definitely has an SMS value in it. For example on theqr.io
website, you can create SMS QR codes to test with.
Sorry, I'm just giving an example of "BarcodeType. sms". What I mean is, in the "Barcode. dart" file, the "BarcodeType. sms" type can be received using "final SMS? Sms". So, which receive is used for "BarcodeType. product"? I didn't see any relevant code comments. In the "factory Barcode. from Native (Map<Object?, Object?>data)" method, I did not see any assignment codes that I know have for "BarcodeType. product" and "BarcodeType. text". "Final String? RawValue" can be used to receive data from "BarcodeType. text", but is it also used to receive data from "BarcodeType. product"?
According to the documentation here https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode
MLKit does not provide the "data structure" behind a Product type barcode. It only provides them for things like email, person name, wifi and so on.
According to the documentation here https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode
MLKit does not provide the "data structure" behind a Product type barcode. It only provides them for things like email, person name, wifi and so on.
So, according to MLKit SDK, it is normal to return a value of type "BarcodeType. product", but it needs to be received using "Final String? RawValue"?
Yes, that looks like your only option right now.
Yes, that looks like your only option right now.
Thank you very much for your answer. The plugin you encapsulated is very good!
I wonder, though, is there a specific structure that we can follow when the BarcodeType
is BarcodeType.product
?
Maybe we can manually parse the raw value to provide the structured data?
I wonder, though, is there a specific structure that we can follow when the
BarcodeType
isBarcodeType.product
? Maybe we can manually parse the raw value to provide the structured data?
The value of "rawValue" should be able to be parsed, right? However, it is necessary to ensure that "BarcodeType. product" can be returned. If it cannot be determined as "BarcodeType. product", then it can only be resolved whether "rawValue" is a pure number to determine whether it may be a product barcode.
We would indeed only be parsing the rawValue
as a "Product" when we know that the BarcodeType
is BarcodeType.product
. However, I don't know what the structure of the Product
model class should look like.
Hi,plugin 4.0.1 version provided declaration of 'Product':
but,the 'barcode.dart' file not get method of product value. Is there an indirect way to obtain it?