From 064884dc0793a5e4605b4817ea69820dbdf49e15 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 19 Feb 2025 17:40:43 -0700 Subject: [PATCH] Fix code warnings by using Description variable and temporarily assuming that Assets are a RecurringTrackedType. --- lib/pages/expense.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pages/expense.dart b/lib/pages/expense.dart index 996bcb1..891b86b 100644 --- a/lib/pages/expense.dart +++ b/lib/pages/expense.dart @@ -58,12 +58,12 @@ class _ExpensePageState extends State { // if the Widgets are expecting RecurringTrackedType, but we // need to be using Frequency? Change to only have one abstract // class and make it nully again? Hmmm... - if (curr is RecurringTrackedType) { + //if (curr is RecurringTrackedType && curr.frequency != null) { itemAmount = "${curr.amount.toStringAsFixed(2)} ${curr.frequency.title}"; - } else { + /*} else { itemAmount = curr.amount.toStringAsFixed(2); - } + }*/ final String itemDescription = curr.description; final double itemDayAmount = @@ -180,7 +180,7 @@ class _ExpensePageState extends State { Expanded( child: Center( child: Text( - curr.description, + itemDescription, style: TextStyle( fontSize: 12.0, ),