Updates from idk when...

This commit is contained in:
Nathan Anderson
2023-08-17 13:34:30 -06:00
parent 6fae83674b
commit 1d1b5f0620
18 changed files with 614 additions and 161 deletions
+14
View File
@@ -40,4 +40,18 @@ class BudgetCategory {
_$BudgetCategoryFromJson(json);
Map<String, dynamic> toJson() => _$BudgetCategoryToJson(this);
factory BudgetCategory.copyWith(
{required BudgetCategory category,
required Map<String, dynamic> data}) =>
BudgetCategory(
id: data['id'] ?? category.id,
budgetId: data['budget_id'] ?? category.budgetId,
name: data['name'] ?? category.name,
color: data['color'] ?? category.color,
createdAt: data['created_at'] ?? category.createdAt,
updatedAt: data['updated_at'] ?? category.updatedAt,
amount: data['amount'] ?? category.amount,
hide: data['hide'] ?? category.hide,
);
}