🐛 Dozens of bug fixes

This commit is contained in:
2026-01-11 18:41:05 +08:00
parent 532bb30c6a
commit 00e063e99f
8 changed files with 28 additions and 27 deletions

View File

@@ -202,9 +202,9 @@ class _EmbedLinkWidgetState extends State<EmbedLinkWidget> {
const Gap(8),
// Title
if (widget.link.title.isNotEmpty) ...[
if (widget.link.title?.isNotEmpty ?? false) ...[
Text(
widget.link.title,
widget.link.title!,
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w600,
),

View File

@@ -998,14 +998,15 @@ class _LinkPreview extends ConsumerWidget {
overflow: TextOverflow.ellipsis,
),
// Title
Text(
embed.title,
style: Theme.of(context).textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w600,
if (embed.title != null)
Text(
embed.title!,
style: Theme.of(context).textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w600,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
// Description
if (embed.description != null &&
embed.description!.isNotEmpty)