Improved category with colors
This commit is contained in:
@@ -2,19 +2,23 @@ part of 'category_bloc.dart';
|
||||
|
||||
final class CategoryState extends Equatable {
|
||||
final List<Category> categories;
|
||||
final Map<String, Color> categoriesColors;
|
||||
|
||||
const CategoryState({
|
||||
this.categories = const [],
|
||||
this.categoriesColors = const {},
|
||||
});
|
||||
|
||||
CategoryState copyWith({
|
||||
List<Category>? categories,
|
||||
Map<String, Color>? categoriesColors,
|
||||
}) {
|
||||
return CategoryState(
|
||||
categories: categories ?? this.categories,
|
||||
categoriesColors: categoriesColors ?? this.categoriesColors,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object> get props => [categories];
|
||||
List<Object> get props => [categories, categoriesColors];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user