This commit is contained in:
JMARyA 2024-10-08 13:47:17 +02:00
parent 0e2ccb9e54
commit 61134f7b63
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -59,16 +59,26 @@ class StatsPage extends StatelessWidget {
)),
if (min.isNotEmpty)
const ListTile(title: Text("Items under Minimum")),
const ListTile(
title: Text(
"Items under Minimum",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
)),
...min.map((item) {
var (itemID, variant) = itemVariant(item.itemVariant);
var name = API().getItem(itemID).variants[variant]!.name;
return ListTile(
title: Text(
"Item ${item.itemVariant} under minimum. Needs ${item.need} more."),
title: Text("$name under minimum. Needs ${item.need} more."),
);
}).toList(),
if (expired.isNotEmpty)
const ListTile(title: Text("Expired Items")),
const ListTile(
title: Text(
"Expired Items",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
)),
// Mapping expired list to widgets
...expired.map((item) {