@@ -4,11 +4,9 @@ import 'package:appflowy/plugins/database_view/application/cell/cell_service.dar
44import 'package:appflowy/plugins/database_view/widgets/card/card.dart' ;
55import 'package:appflowy/plugins/database_view/widgets/card/card_cell_builder.dart' ;
66import 'package:appflowy/plugins/database_view/widgets/card/cells/card_cell.dart' ;
7- import 'package:appflowy/plugins/database_view/widgets/row/cells/text_cell/text_cell_bloc.dart' ;
87import 'package:easy_localization/easy_localization.dart' ;
98import 'package:flowy_infra_ui/flowy_infra_ui.dart' ;
109import 'package:flutter/material.dart' ;
11- import 'package:flutter_bloc/flutter_bloc.dart' ;
1210
1311class MobileCardContent <CustomCardData > extends StatelessWidget {
1412 const MobileCardContent ({
@@ -72,33 +70,28 @@ class MobileCardContent<CustomCardData> extends StatelessWidget {
7270 DatabaseCellContext cellContext,
7371 ) {
7472 final renderHook = RowCardRenderHook <String >();
75- renderHook.addTextCellHook ((cellData, cardData, __) {
76- return BlocBuilder <TextCellBloc , TextCellState >(
77- builder: (context, state) {
78- final cardDataIsEmpty = cardData == null ;
79- final text = cardDataIsEmpty
80- ? LocaleKeys .grid_row_titlePlaceholder.tr ()
81- : cellData;
82- final color = cardDataIsEmpty
83- ? Theme .of (context).hintColor
84- : Theme .of (context).colorScheme.onBackground;
73+ renderHook.addTextCellHook ((cellData, cardData, context) {
74+ final text = cellData.isEmpty
75+ ? LocaleKeys .grid_row_titlePlaceholder.tr ()
76+ : cellData;
77+ final color = cellData.isEmpty
78+ ? Theme .of (context).hintColor
79+ : Theme .of (context).colorScheme.onBackground;
8580
86- return Row (
87- children: [
88- if (! cellContext.rowMeta.isDocumentEmpty) ...[
89- const FlowySvg (FlowySvgs .notes_s),
90- const HSpace (4 ),
91- ],
92- Expanded (
93- child: FlowyText .regular (
94- text,
95- color: color,
96- overflow: TextOverflow .ellipsis,
97- ),
98- ),
99- ],
100- );
101- },
81+ return Row (
82+ children: [
83+ if (! cellContext.rowMeta.isDocumentEmpty) ...[
84+ const FlowySvg (FlowySvgs .notes_s),
85+ const HSpace (4 ),
86+ ],
87+ Expanded (
88+ child: FlowyText .medium (
89+ text,
90+ color: color,
91+ overflow: TextOverflow .ellipsis,
92+ ),
93+ ),
94+ ],
10295 );
10396 });
10497
0 commit comments