feat: toolbar section dividers & post card badge stacking deconfliction v2.0.13

This commit is contained in:
2026-09-03 23:13:55 +03:00
parent 4bbe04dfd8
commit 37f2dbf47d
7 changed files with 78 additions and 36 deletions
+25 -23
View File
@@ -244,7 +244,7 @@ class _PostCardState extends ConsumerState<PostCard>
left: 0,
right: 0,
bottom: 0,
height: 48,
height: 64,
child: IgnorePointer(
child: DecoratedBox(
decoration: BoxDecoration(
@@ -252,7 +252,7 @@ class _PostCardState extends ConsumerState<PostCard>
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Colors.black.withValues(alpha: 0.65),
Colors.black.withValues(alpha: 0.72),
Colors.transparent,
],
),
@@ -266,34 +266,36 @@ class _PostCardState extends ConsumerState<PostCard>
top: 8,
child: _ProviderBadge(name: post.providerName),
),
Positioned(
right: 8,
top: 8,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (post.fileType.toLowerCase().contains('video') ||
post.fileType.toLowerCase().contains('webm') ||
post.fileType.toLowerCase().contains('mp4') ||
post.fileType.toLowerCase().contains('gif')) ...[
_MediaBadge(fileType: post.fileType),
const SizedBox(width: 4),
],
RatingBadge(rating: post.rating),
],
if (post.fileType.toLowerCase().contains('video') ||
post.fileType.toLowerCase().contains('webm') ||
post.fileType.toLowerCase().contains('mp4') ||
post.fileType.toLowerCase().contains('gif'))
Positioned(
right: 8,
top: 8,
child: _MediaBadge(fileType: post.fileType),
),
),
Positioned(
left: 8,
bottom: 8,
child: Row(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (widget.isViewed) ...[
const _SeenBadge(),
const SizedBox(width: 4),
if (widget.isViewed || widget.isDownloaded) ...[
Row(
mainAxisSize: MainAxisSize.min,
children: [
if (widget.isViewed) const _SeenBadge(),
if (widget.isViewed && widget.isDownloaded)
const SizedBox(width: 4),
if (widget.isDownloaded)
const _DownloadedBadge(),
],
),
const SizedBox(height: 4),
],
if (widget.isDownloaded) const _DownloadedBadge(),
RatingBadge(rating: post.rating),
],
),
),
+15 -8
View File
@@ -14,16 +14,23 @@ class RatingBadge extends StatelessWidget {
'explicit' || 'e' => Colors.red,
_ => Colors.blueGrey,
};
return DecoratedBox(
return Container(
padding: const EdgeInsets.symmetric(horizontal: 6.5, vertical: 3),
decoration: BoxDecoration(
color: color.withValues(alpha: 0.85),
borderRadius: BorderRadius.circular(6),
color: color.withValues(alpha: 0.88),
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.white.withValues(alpha: 0.18),
width: 0.7,
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 3),
child: Text(
rating.isEmpty ? 'unknown' : rating,
style: const TextStyle(fontSize: 11, color: Colors.white),
child: Text(
rating.isEmpty ? 'unknown' : rating,
style: const TextStyle(
fontSize: 10.5,
color: Colors.white,
fontWeight: FontWeight.w700,
letterSpacing: 0.2,
),
),
);