diff --git a/lib/pages/report.dart b/lib/pages/report.dart index fb3362e..f211fb8 100644 --- a/lib/pages/report.dart +++ b/lib/pages/report.dart @@ -7,9 +7,6 @@ import '/db.dart'; import '/models/tracked_item.dart'; /// 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: /// - 1 week, 1 month, 1 quarter, 1 year /// - 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 = dailyTotal.toStringAsFixed(3).endsWith("0") ? "" : "~", monthlyEstimate = @@ -105,7 +109,7 @@ class SummaryCardForTotals extends StatelessWidget { // Return the UI element. return SummaryCard( - name: "$summaryTypeLabel Totals", + name: header, leftText: leftText, middleText: middleText, rightText: rightText,