mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 10:33:44 +02:00
fix: add options icon button on detail screen. (also fixed a typo)
This commit is contained in:
parent
35644b989a
commit
4befa42ac4
3 changed files with 8 additions and 9 deletions
|
@ -57,7 +57,7 @@ class _TimelinePostDetailScreenState extends State<TimelinePostDetailScreen> {
|
|||
post: widget.post,
|
||||
timelineService: widget.timelineService,
|
||||
options: widget.options,
|
||||
isInDetialView: true,
|
||||
isInDetailView: true,
|
||||
currentUserId: widget.currentUserId,
|
||||
onTapPost: (post) {},
|
||||
onTapComments: (post) {},
|
||||
|
|
|
@ -42,7 +42,7 @@ class _TimelinePostOverviewState extends State<TimelinePostOverview> {
|
|||
currentUserId: currentPost.creatorId,
|
||||
onTapPost: (post) {},
|
||||
onTapComments: (post) {},
|
||||
isInDetialView: true,
|
||||
isInDetailView: true,
|
||||
isInPostOverview: true,
|
||||
),
|
||||
],
|
||||
|
|
|
@ -10,7 +10,7 @@ class TimelinePostWidget extends StatefulWidget {
|
|||
required this.currentUserId,
|
||||
required this.onTapPost,
|
||||
required this.onTapComments,
|
||||
this.isInDetialView = false,
|
||||
this.isInDetailView = false,
|
||||
this.isInPostOverview = false,
|
||||
super.key,
|
||||
});
|
||||
|
@ -20,7 +20,7 @@ class TimelinePostWidget extends StatefulWidget {
|
|||
final TimelineOptions options;
|
||||
final String currentUserId;
|
||||
final Function(TimelinePost post) onTapPost;
|
||||
final bool isInDetialView;
|
||||
final bool isInDetailView;
|
||||
final Function(TimelinePost post) onTapComments;
|
||||
final bool isInPostOverview;
|
||||
|
||||
|
@ -47,7 +47,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
|||
left: 20,
|
||||
right: 20,
|
||||
top: 20,
|
||||
bottom: widget.isInDetialView ? 100 : 0,
|
||||
bottom: widget.isInDetailView ? 100 : 0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -64,8 +64,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
|||
],
|
||||
),
|
||||
if (post.creatorId == widget.currentUserId &&
|
||||
!widget.isInPostOverview &&
|
||||
!widget.isInDetialView)
|
||||
!widget.isInPostOverview)
|
||||
MoreOptionsButton(
|
||||
timelineService: widget.timelineService,
|
||||
options: options,
|
||||
|
@ -209,7 +208,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
|||
),
|
||||
],
|
||||
),
|
||||
if (widget.isInDetialView) ...[
|
||||
if (widget.isInDetailView) ...[
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
@ -234,7 +233,7 @@ class _TimelinePostWidgetState extends State<TimelinePostWidget> {
|
|||
timelineService: widget.timelineService,
|
||||
),
|
||||
],
|
||||
if (!widget.isInDetialView)
|
||||
if (!widget.isInDetailView)
|
||||
InkWell(
|
||||
onTap: () => widget.onTapPost(widget.post),
|
||||
child: Text(
|
||||
|
|
Loading…
Reference in a new issue