mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-25 07:07:32 -04:00
style: align code and add comment
This commit is contained in:
parent
0e278ddf3f
commit
3ee703cd6d
1 changed files with 11 additions and 6 deletions
|
@ -161,18 +161,23 @@ class FieldCellButton extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = context.watch<AppTheme>();
|
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(
|
return FlowyButton(
|
||||||
radius: BorderRadius.zero,
|
radius: BorderRadius.zero,
|
||||||
hoverColor: theme.shader6,
|
hoverColor: theme.shader6,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
leftIcon: svgWidget(field.fieldType.iconName(), color: theme.iconColor),
|
leftIcon: svgWidget(field.fieldType.iconName(), color: theme.iconColor),
|
||||||
text: FlowyText.medium(
|
text: FlowyText.medium(
|
||||||
Characters(field.name)
|
text,
|
||||||
.replaceAll(Characters(''), Characters('\u{200B}'))
|
fontSize: 12,
|
||||||
.toString(),
|
maxLines: maxLines,
|
||||||
fontSize: 12,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: maxLines,
|
),
|
||||||
overflow: TextOverflow.ellipsis),
|
|
||||||
margin: GridSize.cellContentInsets,
|
margin: GridSize.cellContentInsets,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue