From a611a88f6914cd619cc1af453288a4811442653f Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Mon, 24 Mar 2025 21:08:50 +0800 Subject: [PATCH] opt: post segment Closes #483 Signed-off-by: bggRGjQaUbCoE --- .../video/detail/post_panel/post_panel.dart | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/pages/video/detail/post_panel/post_panel.dart b/lib/pages/video/detail/post_panel/post_panel.dart index 14b74e12f..c6e56a604 100644 --- a/lib/pages/video/detail/post_panel/post_panel.dart +++ b/lib/pages/video/detail/post_panel/post_panel.dart @@ -95,6 +95,7 @@ class _PostPanelState extends CommonCollapseSlidePageState { ...List.generate( list!.length, (index) => Stack( + clipBehavior: Clip.none, children: [ Container( width: double.infinity, @@ -284,8 +285,8 @@ class _PostPanelState extends CommonCollapseSlidePageState { ), ), Positioned( - top: 10, - right: 21, + top: 0, + right: 4, child: iconButton( context: context, size: 26, @@ -426,7 +427,7 @@ class _PostPanelState extends CommonCollapseSlidePageState { iconButton( context: context, size: 26, - tooltip: '使用当前位置时间', + tooltip: '设为当前', icon: Icons.my_location, onPressed: () { setState(() { @@ -439,6 +440,22 @@ class _PostPanelState extends CommonCollapseSlidePageState { }, ), const SizedBox(width: 5), + iconButton( + context: context, + size: 26, + tooltip: isFirst ? '视频开头' : '视频结尾', + icon: isFirst ? Icons.first_page : Icons.last_page, + onPressed: () { + setState(() { + updateSegment( + isFirst: isFirst, + index: index, + value: isFirst ? 0 : plPlayerController.duration.value.inSeconds, + ); + }); + }, + ), + const SizedBox(width: 5), iconButton( context: context, size: 26,