stacked bar graph, edit / remove transaction & budget page base

This commit is contained in:
2024-02-06 23:58:29 +01:00
parent 3abee9ff6f
commit 3610c466d2
25 changed files with 483 additions and 180 deletions

View File

@@ -27,7 +27,9 @@ final class ChartState extends Equatable {
final List<ChartItem> scopedSimplifiedCategoriesNegativeTotalsPercents;
final List<FlSpot> scopedMonthlyTotals;
final Map<String, Map<String, double>> scopedCategoriesMonthlyTotals;
final Map<int, Map<String, double>> scopedCategoriesMonthlyTotals;
final Map<String, Color> categoriesColors;
const ChartState({
this.transactions = const [],
@@ -50,6 +52,7 @@ final class ChartState extends Equatable {
this.scopedSimplifiedCategoriesNegativeTotalsPercents = const [],
this.scopedMonthlyTotals = const [],
this.scopedCategoriesMonthlyTotals = const {},
this.categoriesColors = const {},
});
ChartState copyWith({
@@ -72,7 +75,8 @@ final class ChartState extends Equatable {
List<ChartItem>? scopedSimplifiedCategoriesNegativeTotals,
List<ChartItem>? scopedSimplifiedCategoriesNegativeTotalsPercents,
List<FlSpot>? scopedMonthlyTotals,
Map<String, Map<String, double>>? scopedCategoriesMonthlyTotals,
Map<int, Map<String, double>>? scopedCategoriesMonthlyTotals,
Map<String, Color>? categoriesColors,
}) {
return ChartState(
transactions: transactions ?? this.transactions,
@@ -95,6 +99,7 @@ final class ChartState extends Equatable {
scopedSimplifiedCategoriesNegativeTotalsPercents: scopedSimplifiedCategoriesNegativeTotalsPercents ?? this.scopedSimplifiedCategoriesNegativeTotalsPercents,
scopedMonthlyTotals: scopedMonthlyTotals ?? this.scopedMonthlyTotals,
scopedCategoriesMonthlyTotals: scopedCategoriesMonthlyTotals ?? this.scopedCategoriesMonthlyTotals,
categoriesColors: categoriesColors ?? this.categoriesColors,
);
}
@@ -118,6 +123,7 @@ final class ChartState extends Equatable {
scopedSimplifiedCategoriesNegativeTotalsPercents,
scopedMonthlyTotals,
scopedCategoriesMonthlyTotals,
categoriesColors,
];
}