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: optimaze tap area of row detail cells
appflowy0b83684c6606
diff --git a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/number_cell.dart b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/number_cell.dartdeleted file mode 100644index 0f3f7c5f32..0000000000--- a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/number_cell.dart+++ /dev/null@@ -1,44 +0,0 @@-import 'package:app_flowy/startup/startup.dart';-import 'package:app_flowy/workspace/application/grid/prelude.dart';-import 'package:flutter/material.dart';-import 'package:flutter_bloc/flutter_bloc.dart';--class NumberCell extends StatefulWidget {- final GridCell cellData;-- const NumberCell({- required this.cellData,- Key? key,- }) : super(key: key);-- @override- State<NumberCell> createState() => _NumberCellState();-}--class _NumberCellState extends State<NumberCell> {- late NumberCellBloc _cellBloc;-- @override- void initState() {- _cellBloc = getIt<NumberCellBloc>(param1: widget.cellData);- super.initState();- }-- @override- Widget build(BuildContext context) {- return BlocProvider.value(- value: _cellBloc,- child: BlocBuilder<NumberCellBloc, NumberCellState>(- builder: (context, state) {- return Container();- },- ),- );- }-- @override- Future<void> dispose() async {- _cellBloc.close();- super.dispose();- }-}diff --git a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_detail.dart b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_detail.dartindex 029f3f61ea..fbff4665d9 100644--- a/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_detail.dart+++ b/frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_detail.dart@@ -152,6 +152,15 @@ class _RowDetailCell extends StatelessWidget {final style = _customCellStyle(theme, gridCell.field.fieldType);final cell = buildGridCellWidget(gridCell, cellCache, style: style);+ final gesture = GestureDetector(+ behavior: HitTestBehavior.translucent,+ onTap: () => cell.requestBeginFocus.notify(),+ child: AccessoryHover(+ child: cell,+ contentPadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),+ ),+ );+return ConstrainedBox(constraints: const BoxConstraints(minHeight: 40),child: IntrinsicHeight(@@ -164,12 +173,7 @@ class _RowDetailCell extends StatelessWidget {child: FieldCellButton(field: gridCell.field, onTap: () => _showFieldEditor(context)),),const HSpace(10),- Expanded(- child: AccessoryHover(- child: cell,- contentPadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),- ),- ),+ Expanded(child: gesture),],),),