Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-10 12:31:33 +08:00
parent 06b433aa60
commit b788794f4b
2 changed files with 10 additions and 8 deletions

View File

@@ -44,6 +44,7 @@ class ActionItem extends StatelessWidget {
); );
if (animation != null) { if (animation != null) {
final primary = theme.colorScheme.primary;
child = Stack( child = Stack(
clipBehavior: Clip.none, clipBehavior: Clip.none,
alignment: Alignment.center, alignment: Alignment.center,
@@ -53,7 +54,7 @@ class ActionItem extends StatelessWidget {
builder: (context, child) => CustomPaint( builder: (context, child) => CustomPaint(
size: const Size.square(28), size: const Size.square(28),
painter: _ArcPainter( painter: _ArcPainter(
color: theme.colorScheme.primary, color: primary,
sweepAngle: animation!.value, sweepAngle: animation!.value,
), ),
), ),
@@ -117,6 +118,10 @@ class _ArcPainter extends CustomPainter {
@override @override
void paint(Canvas canvas, Size size) { void paint(Canvas canvas, Size size) {
if (sweepAngle == 0) {
return;
}
final paint = Paint() final paint = Paint()
..color = color ..color = color
..strokeWidth = 2 ..strokeWidth = 2

View File

@@ -1952,15 +1952,12 @@ Widget buildViewPointWidget(
try { try {
double seg = event.localPosition.dx / constraints.maxWidth; double seg = event.localPosition.dx / constraints.maxWidth;
Segment item = plPlayerController.viewPointList Segment item = plPlayerController.viewPointList
.where((item) { .where((item) => item.start >= seg)
return item.start >= seg;
})
.reduce((a, b) => a.start < b.start ? a : b); .reduce((a, b) => a.start < b.start ? a : b);
if (item.from != null) { if (item.from != null) {
plPlayerController.danmakuController?.clear(); plPlayerController
plPlayerController.videoPlayerController?.seek( ..danmakuController?.clear()
Duration(seconds: item.from!), ..videoPlayerController?.seek(Duration(seconds: item.from!));
);
} }
// if (kDebugMode) debugPrint('${item.title},,${item.from}'); // if (kDebugMode) debugPrint('${item.title},,${item.from}');
} catch (e) { } catch (e) {