From e2ed80f2d0c7c5b800131f562825b6ad23777908 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 10 May 2022 18:26:55 +1000 Subject: [PATCH] Add barcode scan context --- lib/barcode.dart | 1 + lib/inventree/model.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/barcode.dart b/lib/barcode.dart index 4fd23f38..af16658a 100644 --- a/lib/barcode.dart +++ b/lib/barcode.dart @@ -99,6 +99,7 @@ class BarcodeHandler { "valid": response.isValid().toString(), "error": response.error, "errorDetail": response.errorDetail, + "overlayText": getOverlayText(context), } ); } else if (data.containsKey("error")) { diff --git a/lib/inventree/model.dart b/lib/inventree/model.dart index 609dafb1..decb7aaa 100644 --- a/lib/inventree/model.dart +++ b/lib/inventree/model.dart @@ -233,7 +233,7 @@ class InvenTreeModel { return {}; } - Future reportModelError(String title, APIResponse response, {Map context = {}}) async { + Future reportModelError(String title, APIResponse response, {Map context = const {}}) async { String dataString = response.data?.toString() ?? "null";