mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-20 14:06:19 +00:00
Update Requirements (#541)
* Update package requiremenst * github workflow updates * ios build updates * Theme adjustments * Further updates * Fix typo * Deprecated imperative apply of Flutter's Gradle plugins Ref: https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply * Refactor wedge scanner * Add context checks * Adjust behaviour if testing * Further refactoring * Moar checks * Logic fix * Fix for wedge scanner test * Fix for barcode processing * Fix * Yet another fix
This commit is contained in:
.github/workflows
android
ios
lib
pubspec.lockpubspec.yamltest
@ -1,4 +1,5 @@
|
||||
import "package:flutter/material.dart";
|
||||
import "package:inventree/helpers.dart";
|
||||
import "package:one_context/one_context.dart";
|
||||
|
||||
import "package:inventree/preferences.dart";
|
||||
@ -43,7 +44,7 @@ class InvenTreeBarcodeControllerState extends State<InvenTreeBarcodeController>
|
||||
* Barcode data should be passed as a string
|
||||
*/
|
||||
Future<void> handleBarcodeData(String? data) async {
|
||||
|
||||
|
||||
// Check that the data is valid, and this view is still mounted
|
||||
if (!mounted || data == null || data.isEmpty) {
|
||||
return;
|
||||
@ -58,7 +59,11 @@ class InvenTreeBarcodeControllerState extends State<InvenTreeBarcodeController>
|
||||
processingBarcode = true;
|
||||
});
|
||||
|
||||
BuildContext? context = OneContext.hasContext ? OneContext().context : null;
|
||||
BuildContext? context;
|
||||
|
||||
if (hasContext()) {
|
||||
context = OneContext.hasContext ? OneContext().context : null;
|
||||
}
|
||||
|
||||
showLoadingOverlay(context);
|
||||
await pauseScan();
|
||||
|
Reference in New Issue
Block a user