fix: 快进快退触发异常

This commit is contained in:
guozhigq
2024-06-13 22:55:54 +08:00
parent ca6f6dd531
commit 5afb50cac9
3 changed files with 6 additions and 6 deletions

View File

@ -30,14 +30,14 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
@override
void initState() {
super.initState();
timer = Timer(const Duration(milliseconds: 400), () {
timer = Timer(const Duration(milliseconds: 200), () {
widget.onSubmitted.call(value);
});
}
void increment() {
timer?.cancel();
timer = Timer(const Duration(milliseconds: 400), () {
timer = Timer(const Duration(milliseconds: 200), () {
widget.onSubmitted.call(value);
});
widget.onChanged.call(value);