Fix the Monthly text for assets now that it has its proper type.

This commit is contained in:
Hyperling 2025-03-07 13:25:55 -07:00
parent 7d08f6c5cf
commit 88d57e217f

View File

@ -103,12 +103,17 @@ class _TrackedItemPageState extends State<TrackedItemPage> {
itemYearAmount = -1;
estimateSymbolYearly = "";
}
final String monthlyTitle = curr.type == ItemType.asset
? ""
: " ${Frequency.monthly.title}";
final String itemTopText = itemDayAmount < 0
? ""
: "$estimateSymbolDaily${itemDayAmount.toStringAsFixed(2)} ${Frequency.daily.title}";
final String itemMiddleText = itemMonthAmount < 0
? ""
: "$estimateSymbolMonthly${itemMonthAmount.toStringAsFixed(2)} ${Frequency.monthly.title}";
: "$estimateSymbolMonthly${itemMonthAmount.toStringAsFixed(2)}$monthlyTitle";
final String itemBottomText = itemYearAmount < 0
? ""
: "$estimateSymbolYearly${itemYearAmount.toStringAsFixed(2)} ${Frequency.yearly.title}";