mirror of
https://github.com/AppFlowy-IO/AppFlowy
synced 2026-05-24 09:38:25 +00:00
fix: make the link align center while sitename is empty (#7955)
This commit is contained in:
parent
0b24f2cd37
commit
ffef4a4e3b
1 changed files with 12 additions and 9 deletions
|
|
@ -188,6 +188,7 @@ class LinkEmbedBlockComponentState
|
|||
|
||||
Widget buildContent(BuildContext context) {
|
||||
final theme = AppFlowyTheme.of(context), textScheme = theme.textColorScheme;
|
||||
final hasSiteName = linkInfo.siteName?.isNotEmpty ?? false;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
@ -231,15 +232,17 @@ class LinkEmbedBlockComponentState
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
FlowyText(
|
||||
linkInfo.siteName ?? '',
|
||||
color: textScheme.primary,
|
||||
fontSize: 14,
|
||||
figmaLineHeight: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
VSpace(4),
|
||||
if (hasSiteName) ...[
|
||||
FlowyText(
|
||||
linkInfo.siteName ?? '',
|
||||
color: textScheme.primary,
|
||||
fontSize: 14,
|
||||
figmaLineHeight: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
VSpace(4),
|
||||
],
|
||||
FlowyText.regular(
|
||||
url,
|
||||
color: textScheme.secondary,
|
||||
|
|
|
|||
Loading…
Reference in a new issue