-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The scanner should display a snackbar "Not a valid product barcode" when we scan a QR-Code #840
Comments
Different answers:
|
Suggested fix: Future<void> onScan(final Barcode barcode) async {
if (barcode.code == null) {
return;
}
if (barcode.format != BarcodeFormat.ean13) { // just added a check on the format
return;
}
final String code = barcode.code!;
if (_barcodeTrustCheck != code) {
_barcodeTrustCheck = code;
return;
}
if (_latestScannedBarcode == code) {
return;
}
_latestScannedBarcode = code;
_addBarcode(code);
} |
It is probably not difficult to add another qr_code_card which is just a bit more compfort for the user, everything is better then just showing nothing if we scan barcodes non the less |
Also we could call UrlLauncher.canLaunch and if true even allow to open the barcode link |
I don't think that's good for user security. There are app to open QR codes and we're not one of them.
Maybe we could add just a snackbar "Not a valid product barcode". |
I'm ok with that solution. Renaming the bug accordingly |
@mse-moises What about this one ? |
Sure, assign me and I'll start working on it after I finish the one that i doing right now. |
@mse-moises any news on this one? |
I think the implementation of not accepting qr codes was no londer needes as @g123k did a lot of refactoring and included this. I'd say a snackbar still makes sense |
Indeed, we don't detect Qr codes anymore. So we can't know if it is a Qr code or not 🤪 |
Ok, so we only detect valid barcodes? If that is true we can close this! @g123k |
What
Old discussion
Screenshot
Part of
The text was updated successfully, but these errors were encountered: