Add a daily estimate. Move estimates to the right of the list item.
This commit is contained in:
@@ -12,6 +12,7 @@ class Expense {
|
||||
required this.frequency,
|
||||
required this.description});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "$name, $cost, ${frequency.title}, $description";
|
||||
}
|
||||
@@ -19,4 +20,8 @@ class Expense {
|
||||
double calcComparableCost() {
|
||||
return cost * frequency.timesPerYear;
|
||||
}
|
||||
|
||||
double calcComparableCostDaily() {
|
||||
return cost / frequency.numDays;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user