Add item count per category.
This commit is contained in:
parent
e57432767d
commit
15b713215f
@ -7,9 +7,6 @@ import '/db.dart';
|
|||||||
import '/models/tracked_item.dart';
|
import '/models/tracked_item.dart';
|
||||||
|
|
||||||
/// TODO:
|
/// TODO:
|
||||||
/// - Expenses (total number, totals by day / month / year)
|
|
||||||
/// - Incomes (total number, totals by day / month / year)
|
|
||||||
/// - Assets (total number, total by day / month / year)
|
|
||||||
/// - Projected Assets in:
|
/// - Projected Assets in:
|
||||||
/// - 1 week, 1 month, 1 quarter, 1 year
|
/// - 1 week, 1 month, 1 quarter, 1 year
|
||||||
/// - 1/2 year? 2 years? 5 years? Allow customization?
|
/// - 1/2 year? 2 years? 5 years? Allow customization?
|
||||||
@ -85,7 +82,14 @@ class SummaryCardForTotals extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine what needs displayed for the item type.
|
/* Determine what needs displayed for the item type. */
|
||||||
|
// Header
|
||||||
|
String plural = snapshot.data!.length == 1 ? "" : "s";
|
||||||
|
String header = "$summaryTypeLabel Total";
|
||||||
|
header += isAsset ? "" : "s";
|
||||||
|
header += " (${snapshot.data!.length} Item$plural)";
|
||||||
|
|
||||||
|
// Total Fields
|
||||||
String dailyEstimate =
|
String dailyEstimate =
|
||||||
dailyTotal.toStringAsFixed(3).endsWith("0") ? "" : "~",
|
dailyTotal.toStringAsFixed(3).endsWith("0") ? "" : "~",
|
||||||
monthlyEstimate =
|
monthlyEstimate =
|
||||||
@ -105,7 +109,7 @@ class SummaryCardForTotals extends StatelessWidget {
|
|||||||
|
|
||||||
// Return the UI element.
|
// Return the UI element.
|
||||||
return SummaryCard(
|
return SummaryCard(
|
||||||
name: "$summaryTypeLabel Totals",
|
name: header,
|
||||||
leftText: leftText,
|
leftText: leftText,
|
||||||
middleText: middleText,
|
middleText: middleText,
|
||||||
rightText: rightText,
|
rightText: rightText,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user