Skip to content

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.

style: align code and add comment

Alexandre Moreau3ee703cd6d58
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell.dart
index 59160565c9..0ee7462e22 100755
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell.dart
@@ -161,18 +161,23 @@ class FieldCellButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = context.watch<AppTheme>();
+
+ // Using this technique to have proper text ellipsis
+ // https://github.com/flutter/flutter/issues/18761#issuecomment-812390920
+ final text = Characters(field.name)
+ .replaceAll(Characters(''), Characters('\u{200B}'))
+ .toString();
return FlowyButton(
radius: BorderRadius.zero,
hoverColor: theme.shader6,
onTap: onTap,
leftIcon: svgWidget(field.fieldType.iconName(), color: theme.iconColor),
text: FlowyText.medium(
- Characters(field.name)
- .replaceAll(Characters(''), Characters('\u{200B}'))
- .toString(),
- fontSize: 12,
- maxLines: maxLines,
- overflow: TextOverflow.ellipsis),
+ text,
+ fontSize: 12,
+ maxLines: maxLines,
+ overflow: TextOverflow.ellipsis,
+ ),
margin: GridSize.cellContentInsets,
);
}