added more blocs
This commit is contained in:
@@ -4,7 +4,7 @@ import 'package:equatable/equatable.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:tunas/domains/account/models/transaction_line.dart';
|
||||
import 'package:tunas/domains/transaction/models/transaction_line.dart';
|
||||
import 'package:tunas/domains/charts/models/chart_item.dart';
|
||||
import 'package:tunas/repositories/account/account_repository.dart';
|
||||
import 'package:tunas/repositories/account/models/transaction.dart';
|
||||
@@ -149,7 +149,11 @@ class ChartBloc extends Bloc<ChartEvent, ChartState> {
|
||||
}
|
||||
|
||||
if (categoriesColors[transaction.category] == null) {
|
||||
categoriesColors[transaction.category] = colors[colorIndex];
|
||||
if (colorIndex >= colors.length) {
|
||||
categoriesColors[transaction.category] = const Color.fromARGB(255, 234, 0, 255);
|
||||
} else {
|
||||
categoriesColors[transaction.category] = colors[colorIndex];
|
||||
}
|
||||
colorIndex++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user