💄 Better bottom nav, snowing animation and notification tile

💫 Animated snowing animation
This commit is contained in:
2025-12-22 23:28:38 +08:00
parent b0b227f36b
commit 09abe79f6a
3 changed files with 99 additions and 69 deletions

View File

@@ -81,14 +81,14 @@ class NotificationTile extends StatelessWidget {
style: compact
? Theme.of(context).textTheme.bodySmall
: Theme.of(context).textTheme.titleMedium,
maxLines: compact ? 2 : null,
maxLines: compact ? 1 : null,
overflow: compact ? TextOverflow.ellipsis : null,
),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (notification.subtitle.isNotEmpty && !compact)
Text(notification.subtitle).bold(),
Text(notification.subtitle, maxLines: compact ? 3 : null).bold(),
Row(
spacing: 6,
children: [
@@ -114,7 +114,9 @@ class NotificationTile extends StatelessWidget {
],
).opacity(0.75).padding(bottom: compact ? 2 : 4),
MarkdownTextContent(
content: notification.content,
content: (compact && notification.content.length > 60)
? '${notification.content.substring(0, 60).replaceAll('\n', ' ')}...'
: notification.content,
textStyle:
(compact
? Theme.of(context).textTheme.bodySmall