mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 20:16:26 +08:00
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class BackwardSeekIndicator extends StatefulWidget {
|
||||
final ValueChanged<Duration> onSubmitted;
|
||||
final int duration;
|
||||
final Duration duration;
|
||||
|
||||
const BackwardSeekIndicator({
|
||||
super.key,
|
||||
@@ -24,7 +24,7 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
duration = Duration(seconds: widget.duration);
|
||||
duration = widget.duration;
|
||||
timer = Timer(const Duration(milliseconds: 400), () {
|
||||
widget.onSubmitted(duration);
|
||||
});
|
||||
@@ -42,7 +42,7 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
|
||||
widget.onSubmitted(duration);
|
||||
});
|
||||
setState(() {
|
||||
duration += Duration(seconds: widget.duration);
|
||||
duration += widget.duration;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class ForwardSeekIndicator extends StatefulWidget {
|
||||
final ValueChanged<Duration> onSubmitted;
|
||||
final int duration;
|
||||
final Duration duration;
|
||||
|
||||
const ForwardSeekIndicator({
|
||||
super.key,
|
||||
@@ -24,7 +24,7 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
duration = Duration(seconds: widget.duration);
|
||||
duration = widget.duration;
|
||||
timer = Timer(const Duration(milliseconds: 400), () {
|
||||
widget.onSubmitted(duration);
|
||||
});
|
||||
@@ -42,7 +42,7 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
|
||||
widget.onSubmitted(duration);
|
||||
});
|
||||
setState(() {
|
||||
duration += Duration(seconds: widget.duration);
|
||||
duration += widget.duration;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user