chore: remove single field listener (#5113)

This commit is contained in:
Richard Shiue
2024-04-11 13:43:36 +08:00
committed by GitHub
parent 3de2a20278
commit 6e3c731162
16 changed files with 109 additions and 100 deletions

View File

@ -72,7 +72,7 @@ class _FieldEditorState extends State<FieldEditor> {
field: widget.field,
fieldController: widget.fieldController,
onFieldInserted: widget.onFieldInserted,
)..add(const FieldEditorEvent.initial()),
),
child: _currentPage == FieldEditorPage.details
? _fieldDetails()
: _fieldGeneral(),

View File

@ -1,6 +1,7 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/cell/cell_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/row/row_banner_bloc.dart';
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_builder.dart';
@ -21,10 +22,12 @@ const _kBannerActionHeight = 40.0;
class RowBanner extends StatefulWidget {
const RowBanner({
super.key,
required this.fieldController,
required this.rowController,
required this.cellBuilder,
});
final FieldController fieldController;
final RowController rowController;
final EditableCellBuilder cellBuilder;
@ -47,6 +50,7 @@ class _RowBannerState extends State<RowBanner> {
return BlocProvider<RowBannerBloc>(
create: (context) => RowBannerBloc(
viewId: widget.rowController.viewId,
fieldController: widget.fieldController,
rowMeta: widget.rowController.rowMeta,
)..add(const RowBannerEvent.initial()),
child: MouseRegion(

View File

@ -57,6 +57,7 @@ class _RowDetailPageState extends State<RowDetailPage> {
controller: scrollController,
children: [
RowBanner(
fieldController: widget.databaseController.fieldController,
rowController: widget.rowController,
cellBuilder: cellBuilder,
),