Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: rename class according to gitbook documentation (#1682)
Nathan.fooo860c5d100b44
diff --git a/frontend/app_flowy/lib/plugins/board/application/card/board_checkbox_cell_bloc.dart b/frontend/app_flowy/lib/plugins/board/application/card/board_checkbox_cell_bloc.dartindex 8229fd1588..37dcf8bab3 100644--- a/frontend/app_flowy/lib/plugins/board/application/card/board_checkbox_cell_bloc.dart+++ b/frontend/app_flowy/lib/plugins/board/application/card/board_checkbox_cell_bloc.dart@@ -64,7 +64,7 @@ class BoardCheckboxCellState with _$BoardCheckboxCellState {required bool isSelected,}) = _CheckboxCellState;- factory BoardCheckboxCellState.initial(GridCellController context) {+ factory BoardCheckboxCellState.initial(GridTextCellController context) {return BoardCheckboxCellState(isSelected: _isSelected(context.getCellData()));}diff --git a/frontend/app_flowy/lib/plugins/board/application/card/board_number_cell_bloc.dart b/frontend/app_flowy/lib/plugins/board/application/card/board_number_cell_bloc.dartindex 4cf0930591..fb9759cc72 100644--- a/frontend/app_flowy/lib/plugins/board/application/card/board_number_cell_bloc.dart+++ b/frontend/app_flowy/lib/plugins/board/application/card/board_number_cell_bloc.dart@@ -60,7 +60,7 @@ class BoardNumberCellState with _$BoardNumberCellState {required String content,}) = _BoardNumberCellState;- factory BoardNumberCellState.initial(GridCellController context) =>+ factory BoardNumberCellState.initial(GridTextCellController context) =>BoardNumberCellState(content: context.getCellData() ?? "",);diff --git a/frontend/app_flowy/lib/plugins/board/application/card/board_text_cell_bloc.dart b/frontend/app_flowy/lib/plugins/board/application/card/board_text_cell_bloc.dartindex 003c3a34f4..1273877f29 100644--- a/frontend/app_flowy/lib/plugins/board/application/card/board_text_cell_bloc.dart+++ b/frontend/app_flowy/lib/plugins/board/application/card/board_text_cell_bloc.dart@@ -6,7 +6,7 @@ import 'dart:async';part 'board_text_cell_bloc.freezed.dart';class BoardTextCellBloc extends Bloc<BoardTextCellEvent, BoardTextCellState> {- final GridCellController cellController;+ final GridTextCellController cellController;void Function()? _onCellChangedFn;BoardTextCellBloc({required this.cellController,@@ -71,7 +71,7 @@ class BoardTextCellState with _$BoardTextCellState {required bool enableEdit,}) = _BoardTextCellState;- factory BoardTextCellState.initial(GridCellController context) =>+ factory BoardTextCellState.initial(GridTextCellController context) =>BoardTextCellState(content: context.getCellData() ?? "",enableEdit: false,diff --git a/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart b/frontend/app_flowy/lib/plugins/board/presentation/board_page.dartindex 89daeb8617..4c8777a204 100644--- a/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart+++ b/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart@@ -288,7 +288,7 @@ class _BoardContentState extends State<BoardContent> {rowPB: rowPB,);- final dataController = GridRowDataController(+ final dataController = RowDataController(rowInfo: rowInfo,fieldController: fieldController,rowCache: rowCache,diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dartindex f5252a178a..00501c8be8 100644--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart@@ -35,7 +35,7 @@ class _BoardTextCellState extends State<BoardTextCell> {@overridevoid initState() {final cellController =- widget.cellControllerBuilder.build() as GridCellController;+ widget.cellControllerBuilder.build() as GridTextCellController;_cellBloc = BoardTextCellBloc(cellController: cellController)..add(const BoardTextCellEvent.initial());_controller = TextEditingController(text: _cellBloc.state.content);diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_controller.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_controller.dartindex bb2dcc59d7..22e01dd08e 100644--- a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_controller.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_controller.dart@@ -1,15 +1,15 @@part of 'cell_service.dart';-typedef GridCellController = IGridCellController<String, String>;-typedef GridCheckboxCellController = IGridCellController<String, String>;-typedef GridNumberCellController = IGridCellController<String, String>;+typedef GridTextCellController = GridCellController<String, String>;+typedef GridCheckboxCellController = GridCellController<String, String>;+typedef GridNumberCellController = GridCellController<String, String>;typedef GridSelectOptionCellController- = IGridCellController<SelectOptionCellDataPB, String>;+ = GridCellController<SelectOptionCellDataPB, String>;typedef GridChecklistCellController- = IGridCellController<SelectOptionCellDataPB, String>;+ = GridCellController<SelectOptionCellDataPB, String>;typedef GridDateCellController- = IGridCellController<DateCellDataPB, CalendarData>;-typedef GridURLCellController = IGridCellController<URLCellDataPB, String>;+ = GridCellController<DateCellDataPB, CalendarData>;+typedef GridURLCellController = GridCellController<URLCellDataPB, String>;abstract class GridCellControllerBuilderDelegate {GridCellFieldNotifier buildFieldNotifier();@@ -27,7 +27,7 @@ class GridCellControllerBuilder {}) : _cellCache = cellCache,_cellId = cellId;- IGridCellController build() {+ GridCellController build() {final cellFieldNotifier = delegate.buildFieldNotifier();switch (_cellId.fieldType) {case FieldType.Checkbox:@@ -35,12 +35,12 @@ class GridCellControllerBuilder {cellId: _cellId,parser: StringCellDataParser(),);- return GridCellController(+ return GridTextCellController(cellId: _cellId,cellCache: _cellCache,cellDataLoader: cellDataLoader,fieldNotifier: cellFieldNotifier,- cellDataPersistence: CellDataPersistence(cellId: _cellId),+ cellDataPersistence: TextCellDataPersistence(cellId: _cellId),);case FieldType.DateTime:final cellDataLoader = GridCellDataLoader(@@ -67,19 +67,19 @@ class GridCellControllerBuilder {cellCache: _cellCache,cellDataLoader: cellDataLoader,fieldNotifier: cellFieldNotifier,- cellDataPersistence: CellDataPersistence(cellId: _cellId),+ cellDataPersistence: TextCellDataPersistence(cellId: _cellId),);case FieldType.RichText:final cellDataLoader = GridCellDataLoader(cellId: _cellId,parser: StringCellDataParser(),);- return GridCellController(+ return GridTextCellController(cellId: _cellId,cellCache: _cellCache,cellDataLoader: cellDataLoader,fieldNotifier: cellFieldNotifier,- cellDataPersistence: CellDataPersistence(cellId: _cellId),+ cellDataPersistence: TextCellDataPersistence(cellId: _cellId),);case FieldType.MultiSelect:case FieldType.SingleSelect:@@ -95,7 +95,7 @@ class GridCellControllerBuilder {cellCache: _cellCache,cellDataLoader: cellDataLoader,fieldNotifier: cellFieldNotifier,- cellDataPersistence: CellDataPersistence(cellId: _cellId),+ cellDataPersistence: TextCellDataPersistence(cellId: _cellId),);case FieldType.URL:@@ -108,7 +108,7 @@ class GridCellControllerBuilder {cellCache: _cellCache,cellDataLoader: cellDataLoader,fieldNotifier: cellFieldNotifier,- cellDataPersistence: CellDataPersistence(cellId: _cellId),+ cellDataPersistence: TextCellDataPersistence(cellId: _cellId),);}throw UnimplementedError;@@ -123,14 +123,14 @@ class GridCellControllerBuilder {/// Generic D represents the type of data that will be saved to the disk///// ignore: must_be_immutable-class IGridCellController<T, D> extends Equatable {+class GridCellController<T, D> extends Equatable {final GridCellIdentifier cellId;final GridCellCache _cellsCache;final GridCellCacheKey _cacheKey;final FieldService _fieldService;final GridCellFieldNotifier _fieldNotifier;final GridCellDataLoader<T> _cellDataLoader;- final IGridCellDataPersistence<D> _cellDataPersistence;+ final GridCellDataPersistence<D> _cellDataPersistence;CellListener? _cellListener;CellDataNotifier<T?>? _cellDataNotifier;@@ -141,12 +141,12 @@ class IGridCellController<T, D> extends Equatable {Timer? _saveDataOperation;bool _isDispose = false;- IGridCellController({+ GridCellController({required this.cellId,required GridCellCache cellCache,required GridCellFieldNotifier fieldNotifier,required GridCellDataLoader<T> cellDataLoader,- required IGridCellDataPersistence<D> cellDataPersistence,+ required GridCellDataPersistence<D> cellDataPersistence,}) : _cellsCache = cellCache,_cellDataLoader = cellDataLoader,_cellDataPersistence = cellDataPersistence,diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_loader.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_loader.dartindex daf404d497..7c269df6d2 100644--- a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_loader.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_loader.dart@@ -5,14 +5,14 @@ abstract class IGridCellDataConfig {bool get reloadOnFieldChanged;}-abstract class IGridCellDataParser<T> {+abstract class GridCellDataParser<T> {T? parserData(List<int> data);}class GridCellDataLoader<T> {final CellService service = CellService();final GridCellIdentifier cellId;- final IGridCellDataParser<T> parser;+ final GridCellDataParser<T> parser;final bool reloadOnFieldChanged;GridCellDataLoader({@@ -43,7 +43,7 @@ class GridCellDataLoader<T> {}}-class StringCellDataParser implements IGridCellDataParser<String> {+class StringCellDataParser implements GridCellDataParser<String> {@overrideString? parserData(List<int> data) {final s = utf8.decode(data);@@ -51,7 +51,7 @@ class StringCellDataParser implements IGridCellDataParser<String> {}}-class DateCellDataParser implements IGridCellDataParser<DateCellDataPB> {+class DateCellDataParser implements GridCellDataParser<DateCellDataPB> {@overrideDateCellDataPB? parserData(List<int> data) {if (data.isEmpty) {@@ -62,7 +62,7 @@ class DateCellDataParser implements IGridCellDataParser<DateCellDataPB> {}class SelectOptionCellDataParser- implements IGridCellDataParser<SelectOptionCellDataPB> {+ implements GridCellDataParser<SelectOptionCellDataPB> {@overrideSelectOptionCellDataPB? parserData(List<int> data) {if (data.isEmpty) {@@ -72,7 +72,7 @@ class SelectOptionCellDataParser}}-class URLCellDataParser implements IGridCellDataParser<URLCellDataPB> {+class URLCellDataParser implements GridCellDataParser<URLCellDataPB> {@overrideURLCellDataPB? parserData(List<int> data) {if (data.isEmpty) {diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_persistence.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_persistence.dartindex 17edb59824..f8dbd67dd0 100644--- a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_persistence.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_data_persistence.dart@@ -2,14 +2,14 @@ part of 'cell_service.dart';/// Save the cell data to disk/// You can extend this class to do custom operations. For example, the DateCellDataPersistence.-abstract class IGridCellDataPersistence<D> {+abstract class GridCellDataPersistence<D> {Future<Option<FlowyError>> save(D data);}-class CellDataPersistence implements IGridCellDataPersistence<String> {+class TextCellDataPersistence implements GridCellDataPersistence<String> {final GridCellIdentifier cellId;- CellDataPersistence({+ TextCellDataPersistence({required this.cellId,});final CellService _cellService = CellService();@@ -33,8 +33,7 @@ class CalendarData with _$CalendarData {_CalendarData;}-class DateCellDataPersistence- implements IGridCellDataPersistence<CalendarData> {+class DateCellDataPersistence implements GridCellDataPersistence<CalendarData> {final GridCellIdentifier cellId;DateCellDataPersistence({required this.cellId,diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/checkbox_cell_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/checkbox_cell_bloc.dartindex 503dd88b81..9ff1534ba4 100644--- a/frontend/app_flowy/lib/plugins/grid/application/cell/checkbox_cell_bloc.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/checkbox_cell_bloc.dart@@ -65,7 +65,7 @@ class CheckboxCellState with _$CheckboxCellState {required bool isSelected,}) = _CheckboxCellState;- factory CheckboxCellState.initial(GridCellController context) {+ factory CheckboxCellState.initial(GridTextCellController context) {return CheckboxCellState(isSelected: _isSelected(context.getCellData()));}}diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/number_cell_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/number_cell_bloc.dartindex de4dd38fc1..d3217794f3 100644--- a/frontend/app_flowy/lib/plugins/grid/application/cell/number_cell_bloc.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/number_cell_bloc.dart@@ -82,7 +82,7 @@ class NumberCellState with _$NumberCellState {required String cellContent,}) = _NumberCellState;- factory NumberCellState.initial(GridCellController context) {+ factory NumberCellState.initial(GridTextCellController context) {return NumberCellState(cellContent: context.getCellData() ?? "",);diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/text_cell_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/text_cell_bloc.dartindex 499721a40e..018baf2703 100644--- a/frontend/app_flowy/lib/plugins/grid/application/cell/text_cell_bloc.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/text_cell_bloc.dart@@ -6,7 +6,7 @@ import 'cell_service/cell_service.dart';part 'text_cell_bloc.freezed.dart';class TextCellBloc extends Bloc<TextCellEvent, TextCellState> {- final GridCellController cellController;+ final GridTextCellController cellController;void Function()? _onCellChangedFn;TextCellBloc({required this.cellController,@@ -66,7 +66,8 @@ class TextCellState with _$TextCellState {required String content,}) = _TextCellState;- factory TextCellState.initial(GridCellController context) => TextCellState(+ factory TextCellState.initial(GridTextCellController context) =>+ TextCellState(content: context.getCellData() ?? "",);}diff --git a/frontend/app_flowy/lib/plugins/grid/application/field/field_controller.dart b/frontend/app_flowy/lib/plugins/grid/application/field/field_controller.dartindex be0d03e514..de5831d587 100644--- a/frontend/app_flowy/lib/plugins/grid/application/field/field_controller.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/field/field_controller.dart@@ -652,7 +652,8 @@ class GridFieldController {}}-class GridRowFieldNotifierImpl extends IGridRowFieldNotifier {+class GridRowFieldNotifierImpl extends RowChangesetNotifierForward+ with RowCacheDelegate {final GridFieldController _cache;OnReceiveUpdateFields? _onChangesetFn;OnReceiveFields? _onFieldFn;diff --git a/frontend/app_flowy/lib/plugins/grid/application/row/row_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/row/row_bloc.dartindex 98d80960bc..2d496dc2a3 100644--- a/frontend/app_flowy/lib/plugins/grid/application/row/row_bloc.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/row/row_bloc.dart@@ -13,11 +13,11 @@ part 'row_bloc.freezed.dart';class RowBloc extends Bloc<RowEvent, RowState> {final RowFFIService _rowService;- final GridRowDataController _dataController;+ final RowDataController _dataController;RowBloc({required RowInfo rowInfo,- required GridRowDataController dataController,+ required RowDataController dataController,}) : _rowService = RowFFIService(gridId: rowInfo.gridId),_dataController = dataController,super(RowState.initial(rowInfo, dataController.loadData())) {diff --git a/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart b/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dartindex c841faccc3..3bba356ef8 100644--- a/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart@@ -12,10 +12,13 @@ part 'row_cache.freezed.dart';typedef RowUpdateCallback = void Function();-abstract class IGridRowFieldNotifier {- UnmodifiableListView<FieldInfo> get fields;+abstract class RowChangesetNotifierForward {void onRowFieldsChanged(VoidCallback callback);void onRowFieldChanged(void Function(FieldInfo) callback);+}++abstract class RowCacheDelegate {+ UnmodifiableListView<FieldInfo> get fields;void onRowDispose();}@@ -33,8 +36,8 @@ class GridRowCache {final RowList _rowList = RowList();final GridCellCache _cellCache;- final IGridRowFieldNotifier _fieldNotifier;- final _RowChangesetNotifier _rowChangeReasonNotifier;+ final RowCacheDelegate _delegate;+ final RowChangesetNotifier _rowChangeReasonNotifier;UnmodifiableListView<RowInfo> get visibleRows {var visibleRows = [..._rowList.rows];@@ -46,10 +49,11 @@ class GridRowCache {GridRowCache({required this.gridId,required this.rows,- required IGridRowFieldNotifier notifier,+ required RowChangesetNotifierForward notifier,+ required RowCacheDelegate delegate,}) : _cellCache = GridCellCache(gridId: gridId),- _rowChangeReasonNotifier = _RowChangesetNotifier(),- _fieldNotifier = notifier {+ _rowChangeReasonNotifier = RowChangesetNotifier(),+ _delegate = delegate {//notifier.onRowFieldsChanged(() => _rowChangeReasonNotifier.receive(const RowsChangedReason.fieldDidChange()));@@ -65,7 +69,7 @@ class GridRowCache {}Future<void> dispose() async {- _fieldNotifier.onRowDispose();+ _delegate.onRowDispose();_rowChangeReasonNotifier.dispose();await _cellCache.dispose();}@@ -225,7 +229,7 @@ class GridRowCache {GridCellMap _makeGridCells(String rowId, RowPB? row) {// ignore: prefer_collection_literalsvar cellDataMap = GridCellMap();- for (final field in _fieldNotifier.fields) {+ for (final field in _delegate.fields) {if (field.visibility) {cellDataMap[field.id] = GridCellIdentifier(rowId: rowId,@@ -264,16 +268,16 @@ class GridRowCache {RowInfo buildGridRow(RowPB rowPB) {return RowInfo(gridId: gridId,- fields: _fieldNotifier.fields,+ fields: _delegate.fields,rowPB: rowPB,);}}-class _RowChangesetNotifier extends ChangeNotifier {+class RowChangesetNotifier extends ChangeNotifier {RowsChangedReason reason = const InitialListState();- _RowChangesetNotifier();+ RowChangesetNotifier();void receive(RowsChangedReason newReason) {reason = newReason;diff --git a/frontend/app_flowy/lib/plugins/grid/application/row/row_data_controller.dart b/frontend/app_flowy/lib/plugins/grid/application/row/row_data_controller.dartindex e5fc6161bb..cb622fcbce 100644--- a/frontend/app_flowy/lib/plugins/grid/application/row/row_data_controller.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/row/row_data_controller.dart@@ -7,13 +7,13 @@ import 'row_cache.dart';typedef OnRowChanged = void Function(GridCellMap, RowsChangedReason);-class GridRowDataController extends GridCellBuilderDelegate {+class RowDataController extends GridCellBuilderDelegate {final RowInfo rowInfo;final List<VoidCallback> _onRowChangedListeners = [];final GridFieldController _fieldController;final GridRowCache _rowCache;- GridRowDataController({+ RowDataController({required this.rowInfo,required GridFieldController fieldController,required GridRowCache rowCache,diff --git a/frontend/app_flowy/lib/plugins/grid/application/row/row_detail_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/row/row_detail_bloc.dartindex 10b4fe3cf8..7d36b71aef 100644--- a/frontend/app_flowy/lib/plugins/grid/application/row/row_detail_bloc.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/row/row_detail_bloc.dart@@ -7,7 +7,7 @@ import 'row_data_controller.dart';part 'row_detail_bloc.freezed.dart';class RowDetailBloc extends Bloc<RowDetailEvent, RowDetailState> {- final GridRowDataController dataController;+ final RowDataController dataController;RowDetailBloc({required this.dataController,diff --git a/frontend/app_flowy/lib/plugins/grid/application/view/grid_view_cache.dart b/frontend/app_flowy/lib/plugins/grid/application/view/grid_view_cache.dartindex eb83500d7d..c79bfcac92 100644--- a/frontend/app_flowy/lib/plugins/grid/application/view/grid_view_cache.dart+++ b/frontend/app_flowy/lib/plugins/grid/application/view/grid_view_cache.dart@@ -18,10 +18,12 @@ class GridViewCache {required this.gridId,required GridFieldController fieldController,}) : _gridViewListener = GridViewListener(viewId: gridId) {+ final delegate = GridRowFieldNotifierImpl(fieldController);_rowCache = GridRowCache(gridId: gridId,rows: [],- notifier: GridRowFieldNotifierImpl(fieldController),+ notifier: delegate,+ delegate: delegate,);_gridViewListener.start(diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/grid_page.dart b/frontend/app_flowy/lib/plugins/grid/presentation/grid_page.dartindex 177e2a2f2a..fec15d0a55 100755--- a/frontend/app_flowy/lib/plugins/grid/presentation/grid_page.dart+++ b/frontend/app_flowy/lib/plugins/grid/presentation/grid_page.dart@@ -275,7 +275,7 @@ class _GridRowsState extends State<_GridRows> {final fieldController =context.read<GridBloc>().gridController.fieldController;- final dataController = GridRowDataController(+ final dataController = RowDataController(rowInfo: rowInfo,fieldController: fieldController,rowCache: rowCache,@@ -308,7 +308,7 @@ class _GridRowsState extends State<_GridRows> {GridRowCache rowCache,GridCellBuilder cellBuilder,) {- final dataController = GridRowDataController(+ final dataController = RowDataController(rowInfo: rowInfo,fieldController: fieldController,rowCache: rowCache,diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dartindex befb275a72..9318d89599 100755--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart@@ -20,7 +20,7 @@ import 'package:easy_localization/easy_localization.dart';class GridRowWidget extends StatefulWidget {final RowInfo rowInfo;- final GridRowDataController dataController;+ final RowDataController dataController;final GridCellBuilder cellBuilder;final void Function(BuildContext, GridCellBuilder) openDetailPage;diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dartindex 415e5fc1ad..ca28a2b138 100644--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart@@ -24,7 +24,7 @@ import '../header/field_cell.dart';import '../header/field_editor.dart';class RowDetailPage extends StatefulWidget with FlowyOverlayDelegate {- final GridRowDataController dataController;+ final RowDataController dataController;final GridCellBuilder cellBuilder;const RowDetailPage({diff --git a/frontend/app_flowy/lib/startup/deps_resolver.dart b/frontend/app_flowy/lib/startup/deps_resolver.dartindex de7981ddb6..71ff5e07dc 100644--- a/frontend/app_flowy/lib/startup/deps_resolver.dart+++ b/frontend/app_flowy/lib/startup/deps_resolver.dart@@ -152,7 +152,7 @@ void _resolveGridDeps(GetIt getIt) {(data, _) => FieldActionSheetBloc(fieldCellContext: data),);- getIt.registerFactoryParam<TextCellBloc, GridCellController, void>(+ getIt.registerFactoryParam<TextCellBloc, GridTextCellController, void>((context, _) => TextCellBloc(cellController: context,),@@ -165,7 +165,7 @@ void _resolveGridDeps(GetIt getIt) {),);- getIt.registerFactoryParam<NumberCellBloc, GridCellController, void>(+ getIt.registerFactoryParam<NumberCellBloc, GridTextCellController, void>((context, _) => NumberCellBloc(cellController: context,),@@ -177,7 +177,7 @@ void _resolveGridDeps(GetIt getIt) {),);- getIt.registerFactoryParam<CheckboxCellBloc, GridCellController, void>(+ getIt.registerFactoryParam<CheckboxCellBloc, GridTextCellController, void>((cellData, _) => CheckboxCellBloc(service: CellService(),cellController: cellData,diff --git a/frontend/app_flowy/test/bloc_test/board_test/util.dart b/frontend/app_flowy/test/bloc_test/board_test/util.dartindex fb83225200..3e3985b195 100644--- a/frontend/app_flowy/test/bloc_test/board_test/util.dart+++ b/frontend/app_flowy/test/bloc_test/board_test/util.dart@@ -97,7 +97,7 @@ class BoardTestContext {return editorBloc;}- Future<IGridCellController> makeCellController(String fieldId) async {+ Future<GridCellController> makeCellController(String fieldId) async {final builder = await makeCellControllerBuilder(fieldId);return builder.build();}@@ -109,7 +109,7 @@ class BoardTestContext {final rowCache = _boardDataController.rowCache;final fieldController = _boardDataController.fieldController;- final rowDataController = GridRowDataController(+ final rowDataController = RowDataController(rowInfo: rowInfo,fieldController: fieldController,rowCache: rowCache,diff --git a/frontend/app_flowy/test/bloc_test/grid_test/util.dart b/frontend/app_flowy/test/bloc_test/grid_test/util.dartindex 23b2ade691..89bd411ac6 100644--- a/frontend/app_flowy/test/bloc_test/grid_test/util.dart+++ b/frontend/app_flowy/test/bloc_test/grid_test/util.dart@@ -54,7 +54,7 @@ class GridTestContext {return editorBloc;}- Future<IGridCellController> makeCellController(+ Future<GridCellController> makeCellController(String fieldId, int rowIndex) async {final builder = await makeCellControllerBuilder(fieldId, rowIndex);return builder.build();@@ -68,7 +68,7 @@ class GridTestContext {final rowCache = gridController.rowCache;final fieldController = gridController.fieldController;- final rowDataController = GridRowDataController(+ final rowDataController = RowDataController(rowInfo: rowInfo,fieldController: fieldController,rowCache: rowCache,@@ -131,19 +131,20 @@ class GridTestContext {return cellController;}- Future<GridCellController> makeTextCellController(int rowIndex) async {+ Future<GridTextCellController> makeTextCellController(int rowIndex) async {final field = fieldContexts.firstWhere((element) => element.fieldType == FieldType.RichText);final cellController =- await makeCellController(field.id, rowIndex) as GridCellController;+ await makeCellController(field.id, rowIndex) as GridTextCellController;return cellController;}- Future<GridCellController> makeCheckboxCellController(int rowIndex) async {+ Future<GridTextCellController> makeCheckboxCellController(+ int rowIndex) async {final field = fieldContexts.firstWhere((element) => element.fieldType == FieldType.Checkbox);final cellController =- await makeCellController(field.id, rowIndex) as GridCellController;+ await makeCellController(field.id, rowIndex) as GridTextCellController;return cellController;}}