2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 21:46:46 +00:00

skip SnackIcon banner when opening a view from successful barcode scan (#266) (#267)

This commit is contained in:
simonkuehling 2023-02-19 11:07:47 +01:00 committed by GitHub
parent 80b83b842d
commit 113b3d69a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,11 +189,6 @@ class BarcodeScanHandler extends BarcodeHandler {
*/ */
Future<void> handlePart(int pk) async { Future<void> handlePart(int pk) async {
InvenTreePart().get(pk).then((var part) { InvenTreePart().get(pk).then((var part) {
showSnackIcon(
L10().part,
success: true,
icon: Icons.qr_code,
);
// Dismiss the barcode scanner // Dismiss the barcode scanner
OneContext().pop(); OneContext().pop();
@ -208,11 +203,6 @@ class BarcodeScanHandler extends BarcodeHandler {
*/ */
Future<void> handleStockItem(int pk) async { Future<void> handleStockItem(int pk) async {
InvenTreeStockItem().get(pk).then((var item) { InvenTreeStockItem().get(pk).then((var item) {
showSnackIcon(
L10().stockItem,
success: true,
icon: Icons.qr_code,
);
OneContext().pop(); OneContext().pop();
if (item is InvenTreeStockItem) { if (item is InvenTreeStockItem) {
OneContext().push(MaterialPageRoute( OneContext().push(MaterialPageRoute(
@ -227,11 +217,6 @@ class BarcodeScanHandler extends BarcodeHandler {
Future<void> handleStockLocation(int pk) async { Future<void> handleStockLocation(int pk) async {
InvenTreeStockLocation().get(pk).then((var loc) { InvenTreeStockLocation().get(pk).then((var loc) {
if (loc is InvenTreeStockLocation) { if (loc is InvenTreeStockLocation) {
showSnackIcon(
L10().stockLocation,
success: true,
icon: Icons.qr_code,
);
OneContext().pop(); OneContext().pop();
OneContext().navigator.push(MaterialPageRoute( OneContext().navigator.push(MaterialPageRoute(
builder: (context) => LocationDisplayWidget(loc))); builder: (context) => LocationDisplayWidget(loc)));
@ -244,12 +229,6 @@ class BarcodeScanHandler extends BarcodeHandler {
*/ */
Future<void> handleSupplierPart(int pk) async { Future<void> handleSupplierPart(int pk) async {
InvenTreeSupplierPart().get(pk).then((var supplierpart) { InvenTreeSupplierPart().get(pk).then((var supplierpart) {
showSnackIcon(
L10().supplierPart,
success: true,
icon: Icons.qr_code,
);
OneContext().pop(); OneContext().pop();
if (supplierpart is InvenTreeSupplierPart) { if (supplierpart is InvenTreeSupplierPart) {