From 5c1ceb7a0cd3f78fe45ab5c8cbbb3a0385461d4f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 11 Dec 2024 21:55:31 +1100 Subject: [PATCH] Remove unused var --- lib/barcode/controller.dart | 6 ------ lib/widget/progress.dart | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/barcode/controller.dart b/lib/barcode/controller.dart index 7a1fb1f8..f1c3789b 100644 --- a/lib/barcode/controller.dart +++ b/lib/barcode/controller.dart @@ -59,12 +59,6 @@ class InvenTreeBarcodeControllerState extends State processingBarcode = true; }); - BuildContext? context; - - if (hasContext()) { - context = OneContext.hasContext ? OneContext().context : null; - } - showLoadingOverlay(); await pauseScan(); diff --git a/lib/widget/progress.dart b/lib/widget/progress.dart index 618941b3..a2a296d7 100644 --- a/lib/widget/progress.dart +++ b/lib/widget/progress.dart @@ -45,7 +45,7 @@ Widget progressIndicator() { void showLoadingOverlay() { - BuildContext? context = OneContext().context; + BuildContext? context = OneContext.hasContext ? OneContext().context : null; if (context == null) { return;