@@ -4,16 +4,16 @@ import 'package:flutter_bloc/flutter_bloc.dart';
44import 'package:freezed_annotation/freezed_annotation.dart' ;
55import 'package:app_flowy/workspace/application/grid/cell/cell_service/cell_service.dart' ;
66
7- part 'selection_cell_bloc .freezed.dart' ;
7+ part 'select_option_cell_bloc .freezed.dart' ;
88
9- class SelectionCellBloc extends Bloc <SelectionCellEvent , SelectionCellState > {
9+ class SelectOptionCellBloc extends Bloc <SelectOptionCellEvent , SelectOptionCellState > {
1010 final GridSelectOptionCellContext cellContext;
1111 void Function ()? _onCellChangedFn;
1212
13- SelectionCellBloc ({
13+ SelectOptionCellBloc ({
1414 required this .cellContext,
15- }) : super (SelectionCellState .initial (cellContext)) {
16- on < SelectionCellEvent > (
15+ }) : super (SelectOptionCellState .initial (cellContext)) {
16+ on < SelectOptionCellEvent > (
1717 (event, emit) async {
1818 await event.map (
1919 initial: (_InitialCell value) async {
@@ -44,7 +44,7 @@ class SelectionCellBloc extends Bloc<SelectionCellEvent, SelectionCellState> {
4444 _onCellChangedFn = cellContext.startListening (
4545 onCellChanged: ((selectOptionContext) {
4646 if (! isClosed) {
47- add (SelectionCellEvent .didReceiveOptions (
47+ add (SelectOptionCellEvent .didReceiveOptions (
4848 selectOptionContext.options,
4949 selectOptionContext.selectOptions,
5050 ));
@@ -55,25 +55,25 @@ class SelectionCellBloc extends Bloc<SelectionCellEvent, SelectionCellState> {
5555}
5656
5757@freezed
58- class SelectionCellEvent with _$SelectionCellEvent {
59- const factory SelectionCellEvent .initial () = _InitialCell ;
60- const factory SelectionCellEvent .didReceiveOptions (
58+ class SelectOptionCellEvent with _$SelectOptionCellEvent {
59+ const factory SelectOptionCellEvent .initial () = _InitialCell ;
60+ const factory SelectOptionCellEvent .didReceiveOptions (
6161 List <SelectOption > options,
6262 List <SelectOption > selectedOptions,
6363 ) = _DidReceiveOptions ;
6464}
6565
6666@freezed
67- class SelectionCellState with _$SelectionCellState {
68- const factory SelectionCellState ({
67+ class SelectOptionCellState with _$SelectOptionCellState {
68+ const factory SelectOptionCellState ({
6969 required List <SelectOption > options,
7070 required List <SelectOption > selectedOptions,
71- }) = _SelectionCellState ;
71+ }) = _SelectOptionCellState ;
7272
73- factory SelectionCellState .initial (GridSelectOptionCellContext context) {
73+ factory SelectOptionCellState .initial (GridSelectOptionCellContext context) {
7474 final data = context.getCellData ();
7575
76- return SelectionCellState (
76+ return SelectOptionCellState (
7777 options: data? .options ?? [],
7878 selectedOptions: data? .selectOptions ?? [],
7979 );
0 commit comments