Updates from idk when...
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user