copyWith method

Category copyWith({
  1. String? id,
  2. String? categoryGroupId,
  3. String? name,
  4. bool? hidden,
  5. String? originalCategoryGroupId,
  6. String? note,
  7. num? budgeted,
  8. num? activity,
  9. num? balance,
  10. CategoryGoalType? goalType,
  11. DateTime? goalCreationMonth,
  12. num? goalTarget,
  13. DateTime? goalTargetMonth,
  14. int? goalPercentageComplete,
  15. int? goalMonthsToBudget,
  16. num? goalUnderFunded,
  17. num? goalOverallFunded,
  18. num? goalOverallLeft,
  19. bool? deleted,
})

Implementation

Category copyWith(
    {String? id,
    String? categoryGroupId,
    String? name,
    bool? hidden,
    String? originalCategoryGroupId,
    String? note,
    num? budgeted,
    num? activity,
    num? balance,
    enums.CategoryGoalType? goalType,
    DateTime? goalCreationMonth,
    num? goalTarget,
    DateTime? goalTargetMonth,
    int? goalPercentageComplete,
    int? goalMonthsToBudget,
    num? goalUnderFunded,
    num? goalOverallFunded,
    num? goalOverallLeft,
    bool? deleted}) {
  return Category(
      id: id ?? this.id,
      categoryGroupId: categoryGroupId ?? this.categoryGroupId,
      name: name ?? this.name,
      hidden: hidden ?? this.hidden,
      originalCategoryGroupId:
          originalCategoryGroupId ?? this.originalCategoryGroupId,
      note: note ?? this.note,
      budgeted: budgeted ?? this.budgeted,
      activity: activity ?? this.activity,
      balance: balance ?? this.balance,
      goalType: goalType ?? this.goalType,
      goalCreationMonth: goalCreationMonth ?? this.goalCreationMonth,
      goalTarget: goalTarget ?? this.goalTarget,
      goalTargetMonth: goalTargetMonth ?? this.goalTargetMonth,
      goalPercentageComplete:
          goalPercentageComplete ?? this.goalPercentageComplete,
      goalMonthsToBudget: goalMonthsToBudget ?? this.goalMonthsToBudget,
      goalUnderFunded: goalUnderFunded ?? this.goalUnderFunded,
      goalOverallFunded: goalOverallFunded ?? this.goalOverallFunded,
      goalOverallLeft: goalOverallLeft ?? this.goalOverallLeft,
      deleted: deleted ?? this.deleted);
}