• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

inventree / inventree-app / 21589014499

02 Feb 2026 11:52AM UTC coverage: 1.444% (-0.01%) from 1.454%
21589014499

push

github

web-flow
Part requirements (#761)

* Add setting to control if part requirements are shown

* Split settings for Part and Stock

* Fetch part requirements information

* Add "building" indicator

* Show order allocation progress for part requirements

* Bump release notes

* Remove unused import

0 of 163 new or added lines in 7 files covered. (0.0%)

10338 existing lines in 38 files now uncovered.

768 of 53197 relevant lines covered (1.44%)

0.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

9.52
/lib/widget/progress.dart
1
import "dart:io";
2

3
import "package:flutter/material.dart";
4
import "package:flutter_overlay_loader/flutter_overlay_loader.dart";
5
import "package:inventree/app_colors.dart";
6
import "package:inventree/helpers.dart";
7
import "package:inventree/widget/link_icon.dart";
8
import "package:one_context/one_context.dart";
9

10
/*
11
 * A simplified linear progress bar widget,
12
 * with standardized color depiction
13
 */
14
Widget ProgressBar(double value, {double maximum = 1.0}) {
×
15
  double v = 0;
16

17
  if (value <= 0 || maximum <= 0) {
×
18
    v = 0;
19
  } else {
20
    v = value / maximum;
×
21
  }
22

23
  return LinearProgressIndicator(
×
24
    value: v,
25
    backgroundColor: Colors.grey,
26
    color: v >= 1 ? COLOR_SUCCESS : COLOR_WARNING,
×
27
  );
28
}
29

NEW
30
Widget ProgressText(double value, {double maximum = 1.0}) {
×
NEW
31
  Color textColor = value < maximum ? COLOR_WARNING : COLOR_SUCCESS;
×
32

NEW
33
  String v = simpleNumberString(value);
×
NEW
34
  String m = simpleNumberString(maximum);
×
35

NEW
36
  return LargeText("${v} / ${m}", color: textColor);
×
37
}
38

39
/*
40
 * Construct a circular progress indicator
41
 */
42
Widget progressIndicator() {
×
43
  return Center(child: CircularProgressIndicator());
×
44
}
45

46
void showLoadingOverlay() {
1✔
47
  // Do not show overlay if running unit tests
48
  if (Platform.environment.containsKey("FLUTTER_TEST")) {
2✔
49
    return;
50
  }
51

52
  BuildContext? context = OneContext.hasContext ? OneContext().context : null;
×
53

54
  if (context == null) {
55
    return;
56
  }
57

58
  Loader.show(
×
59
    context,
60
    themeData: Theme.of(
×
61
      context,
62
    ).copyWith(colorScheme: ColorScheme.fromSwatch()),
×
63
  );
64
}
65

66
void hideLoadingOverlay() {
×
67
  if (Loader.isShown) {
×
68
    Loader.hide();
×
69
  }
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc