2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Refactor barcode scann function

- Provide a custom callback to be executed when the barcode is scanned
This commit is contained in:
Oliver
2021-10-03 12:04:01 +11:00
parent f75aa4ca0e
commit 4f8794e652
4 changed files with 67 additions and 105 deletions

View File

@ -335,6 +335,13 @@ class APIFormField {
var handler = UniqueBarcodeHandler((String hash) {
controller.text = hash;
data["value"] = hash;
successTone();
showSnackIcon(
L10().barcodeAssigned,
success: true
);
});
Navigator.push(