diff --git a/lib/pages/video/introduction/ugc/widgets/action_item.dart b/lib/pages/video/introduction/ugc/widgets/action_item.dart index 4bae792a..14e3e2dd 100644 --- a/lib/pages/video/introduction/ugc/widgets/action_item.dart +++ b/lib/pages/video/introduction/ugc/widgets/action_item.dart @@ -44,6 +44,7 @@ class ActionItem extends StatelessWidget { ); if (animation != null) { + final primary = theme.colorScheme.primary; child = Stack( clipBehavior: Clip.none, alignment: Alignment.center, @@ -53,7 +54,7 @@ class ActionItem extends StatelessWidget { builder: (context, child) => CustomPaint( size: const Size.square(28), painter: _ArcPainter( - color: theme.colorScheme.primary, + color: primary, sweepAngle: animation!.value, ), ), @@ -117,6 +118,10 @@ class _ArcPainter extends CustomPainter { @override void paint(Canvas canvas, Size size) { + if (sweepAngle == 0) { + return; + } + final paint = Paint() ..color = color ..strokeWidth = 2 diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index df81d488..ee712997 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -1952,15 +1952,12 @@ Widget buildViewPointWidget( try { double seg = event.localPosition.dx / constraints.maxWidth; Segment item = plPlayerController.viewPointList - .where((item) { - return item.start >= seg; - }) + .where((item) => item.start >= seg) .reduce((a, b) => a.start < b.start ? a : b); if (item.from != null) { - plPlayerController.danmakuController?.clear(); - plPlayerController.videoPlayerController?.seek( - Duration(seconds: item.from!), - ); + plPlayerController + ..danmakuController?.clear() + ..videoPlayerController?.seek(Duration(seconds: item.from!)); } // if (kDebugMode) debugPrint('${item.title},,${item.from}'); } catch (e) {