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

Fix for unit test

This commit is contained in:
Oliver Walters 2024-12-11 22:39:33 +11:00
parent e1912d6878
commit d25c47ccc3

View File

@ -1,5 +1,7 @@
import "dart:io";
import "package:flutter/material.dart";
import "package:flutter_overlay_loader/flutter_overlay_loader.dart";
import "package:inventree/app_colors.dart";
@ -45,6 +47,11 @@ Widget progressIndicator() {
void showLoadingOverlay() {
// Do not show overlay if running unit tests
if (Platform.environment.containsKey("FLUTTER_TEST")) {
return;
}
BuildContext? context = OneContext.hasContext ? OneContext().context : null;
if (context == null) {