mirror of
https://github.com/inventree/inventree-app.git
synced 2026-02-06 12:55:50 +00:00
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
This commit is contained in:
@@ -3,6 +3,8 @@ import "dart:io";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_overlay_loader/flutter_overlay_loader.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/helpers.dart";
|
||||
import "package:inventree/widget/link_icon.dart";
|
||||
import "package:one_context/one_context.dart";
|
||||
|
||||
/*
|
||||
@@ -25,6 +27,15 @@ Widget ProgressBar(double value, {double maximum = 1.0}) {
|
||||
);
|
||||
}
|
||||
|
||||
Widget ProgressText(double value, {double maximum = 1.0}) {
|
||||
Color textColor = value < maximum ? COLOR_WARNING : COLOR_SUCCESS;
|
||||
|
||||
String v = simpleNumberString(value);
|
||||
String m = simpleNumberString(maximum);
|
||||
|
||||
return LargeText("${v} / ${m}", color: textColor);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct a circular progress indicator
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user