···
this.showCommentButton = true,
this.disableNavigation = false,
···
final DateTime? currentTime;
final bool showCommentButton;
final bool disableNavigation;
/// Check if this post should be clickable
/// Only text posts (no embeds or non-video/link embeds) are clickable
···
Widget build(BuildContext context) {
-
margin: const EdgeInsets.only(bottom: 8),
-
decoration: const BoxDecoration(
color: AppColors.background,
-
border: Border(bottom: BorderSide(color: AppColors.border)),
-
padding: const EdgeInsets.fromLTRB(16, 4, 16, 1),
crossAxisAlignment: CrossAxisAlignment.start,
// Community and author info
-
_buildCommunityAvatar(post.post.community),
-
const SizedBox(width: 8),
-
crossAxisAlignment: CrossAxisAlignment.start,
-
// Community handle with styled parts
-
_buildCommunityHandle(post.post.community),
-
'@${post.post.author.handle}',
-
style: const TextStyle(
-
color: AppColors.textSecondary,
-
DateTimeUtils.formatTimeAgo(
-
currentTime: currentTime,
-
color: AppColors.textPrimary.withValues(alpha: 0.5),
-
const SizedBox(height: 8),
// Wrap content in InkWell if clickable (text-only posts)
···
// Reduced spacing before action buttons
-
const SizedBox(height: 4),
-
showCommentButton: showCommentButton,
···
this.showCommentButton = true,
this.disableNavigation = false,
+
this.showActions = true,
+
this.showHeader = true,
···
final DateTime? currentTime;
final bool showCommentButton;
final bool disableNavigation;
+
final bool showActions;
/// Check if this post should be clickable
/// Only text posts (no embeds or non-video/link embeds) are clickable
···
Widget build(BuildContext context) {
+
margin: EdgeInsets.only(bottom: showHeader ? 8 : 0),
+
decoration: BoxDecoration(
color: AppColors.background,
+
? const Border(bottom: BorderSide(color: AppColors.border))
+
padding: EdgeInsets.fromLTRB(16, showHeader ? 4 : 12, 16, 1),
crossAxisAlignment: CrossAxisAlignment.start,
// Community and author info
+
_buildCommunityAvatar(post.post.community),
+
const SizedBox(width: 8),
+
crossAxisAlignment: CrossAxisAlignment.start,
+
// Community handle with styled parts
+
_buildCommunityHandle(post.post.community),
+
'@${post.post.author.handle}',
+
style: const TextStyle(
+
color: AppColors.textSecondary,
+
DateTimeUtils.formatTimeAgo(
+
currentTime: currentTime,
+
color: AppColors.textPrimary.withValues(alpha: 0.5),
+
const SizedBox(height: 8),
// Wrap content in InkWell if clickable (text-only posts)
···
// Reduced spacing before action buttons
+
if (showActions) const SizedBox(height: 4),
+
PostCardActions(post: post, showCommentButton: showCommentButton),