Add note for next steps in making the ListView more abstract.

This commit is contained in:
Hyperling 2025-02-12 12:55:10 -07:00
parent 21f67b8a36
commit d35c250913

View File

@ -54,6 +54,10 @@ class _ExpensePageState extends State<ExpensePage> {
final itemKey = Key(curr.id!.toString());
final String itemTitle = curr.name;
final String itemAmount;
// TODO: How can we do RecurringTrackedType vs TrackedType here
// 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) {
itemAmount =
"${curr.amount.toStringAsFixed(2)} ${curr.frequency.title}";