Improved category with colors
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:tunas/repositories/account/account_repository.dart';
|
||||
@@ -22,6 +24,7 @@ class CategoryBloc extends Bloc<CategoryEvent, CategoryState> {
|
||||
) {
|
||||
emit(state.copyWith(
|
||||
categories: event.categories,
|
||||
categoriesColors: { for (var category in event.categories) category.label : category.rgbToColor() }
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user