fix: 连续快进异常

This commit is contained in:
guozhigq
2024-05-26 17:30:42 +08:00
parent 979346233f
commit 619f0810d2
3 changed files with 16 additions and 2 deletions

View File

@ -935,7 +935,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
begin: 0.0,
end: _hideSeekBackwardButton.value ? 0.0 : 1.0,
),
duration: const Duration(milliseconds: 500),
duration: const Duration(milliseconds: 200),
builder: (BuildContext context, double value,
Widget? child) =>
Opacity(
@ -978,7 +978,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
begin: 0.0,
end: _hideSeekForwardButton.value ? 0.0 : 1.0,
),
duration: const Duration(milliseconds: 500),
duration: const Duration(milliseconds: 200),
builder: (BuildContext context, double value,
Widget? child) =>
Opacity(

View File

@ -20,6 +20,13 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
Timer? timer;
@override
void setState(VoidCallback fn) {
if (mounted) {
super.setState(fn);
}
}
@override
void initState() {
super.initState();

View File

@ -20,6 +20,13 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
Timer? timer;
@override
void setState(VoidCallback fn) {
if (mounted) {
super.setState(fn);
}
}
@override
void initState() {
super.initState();