Solian/lib/widgets/posts/post_owned_list.dart

42 lines
1.0 KiB
Dart
Raw Normal View History

2024-07-09 14:39:44 +00:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:solian/models/post.dart';
2024-07-09 15:06:55 +00:00
import 'package:solian/widgets/posts/post_item.dart';
2024-07-09 14:39:44 +00:00
class PostOwnedListEntry extends StatelessWidget {
final Post item;
final Function onTap;
2024-08-04 12:43:25 +00:00
final bool isFullContent;
2024-08-04 09:15:56 +00:00
final Color? backgroundColor;
2024-07-09 14:39:44 +00:00
const PostOwnedListEntry({
super.key,
required this.item,
required this.onTap,
2024-08-04 12:43:25 +00:00
this.isFullContent = false,
2024-08-04 09:15:56 +00:00
this.backgroundColor,
2024-07-09 14:39:44 +00:00
});
@override
Widget build(BuildContext context) {
return Card(
2024-08-04 09:15:56 +00:00
child: GestureDetector(
2024-07-09 14:39:44 +00:00
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
2024-07-09 15:06:55 +00:00
PostItem(
key: Key('p${item.id}'),
2024-07-09 15:06:55 +00:00
item: item,
isShowEmbed: false,
isClickable: false,
isShowReply: false,
isReactable: false,
).paddingSymmetric(vertical: 8),
2024-07-09 14:39:44 +00:00
],
),
onTap: () => onTap(),
),
);
}
}