complete budget page
This commit is contained in:
@@ -5,21 +5,46 @@ final class BudgetState {
|
||||
final double initialBudget;
|
||||
final double remainingBudget;
|
||||
|
||||
final List<Budget> compareBudgets;
|
||||
final List<Budget> otherBudgets;
|
||||
final num compareYear;
|
||||
final num compareMonth;
|
||||
final DateTime? firstDate;
|
||||
final DateTime? lastDate;
|
||||
|
||||
const BudgetState({
|
||||
this.budgets = const [],
|
||||
this.initialBudget = 2300.0,
|
||||
this.remainingBudget = 2300.0,
|
||||
this.compareBudgets = const [],
|
||||
this.otherBudgets = const [],
|
||||
this.compareYear = 2000,
|
||||
this.compareMonth = 1,
|
||||
this.firstDate,
|
||||
this.lastDate,
|
||||
});
|
||||
|
||||
BudgetState copyWith({
|
||||
List<Budget>? budgets,
|
||||
double? initialBudget,
|
||||
double? remainingBudget,
|
||||
List<Budget>? compareBudgets,
|
||||
List<Budget>? otherBudgets,
|
||||
num? compareYear,
|
||||
num? compareMonth,
|
||||
DateTime? firstDate,
|
||||
DateTime? lastDate,
|
||||
}) {
|
||||
return BudgetState(
|
||||
budgets: budgets ?? this.budgets,
|
||||
initialBudget: initialBudget ?? this.initialBudget,
|
||||
remainingBudget: remainingBudget ?? this.remainingBudget,
|
||||
compareBudgets: compareBudgets ?? this.compareBudgets,
|
||||
otherBudgets: otherBudgets ?? this.otherBudgets,
|
||||
compareYear: compareYear ?? this.compareYear,
|
||||
compareMonth: compareMonth ?? this.compareMonth,
|
||||
firstDate: firstDate ?? this.firstDate,
|
||||
lastDate: lastDate ?? this.lastDate,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user