mod: reenable multi seek

Closes #365

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-02 10:22:35 +08:00
parent 1e83b4557f
commit a605c0fcfb
2 changed files with 64 additions and 64 deletions

View File

@@ -34,17 +34,17 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
super.dispose(); super.dispose();
} }
// void increment() { void increment() {
// timer?.cancel(); timer?.cancel();
// timer = Timer(const Duration(milliseconds: 400), () { timer = Timer(const Duration(milliseconds: 400), () {
// widget.onSubmitted.call(value); widget.onSubmitted.call(value);
// }); });
// widget.onChanged.call(value); // widget.onChanged.call(value);
// // 重复点击 快退秒数累加10 // 重复点击 快退秒数累加10
// setState(() { setState(() {
// value += const Duration(seconds: 10); value += const Duration(seconds: 10);
// }); });
// } }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@@ -59,31 +59,31 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
end: Alignment.centerRight, end: Alignment.centerRight,
), ),
), ),
// child: InkWell(
// splashColor: const Color(0x44767676),
// onTap: increment,
alignment: Alignment.center, alignment: Alignment.center,
child: Column( child: InkWell(
mainAxisSize: MainAxisSize.min, splashColor: const Color(0x44767676),
mainAxisAlignment: MainAxisAlignment.center, onTap: increment,
crossAxisAlignment: CrossAxisAlignment.center, child: Column(
children: [ mainAxisSize: MainAxisSize.min,
const Icon( mainAxisAlignment: MainAxisAlignment.center,
Icons.fast_rewind, crossAxisAlignment: CrossAxisAlignment.center,
size: 24.0, children: [
color: Colors.white, const Icon(
), Icons.fast_rewind,
const SizedBox(height: 8.0), size: 24.0,
Text(
'快退${value.inSeconds}',
style: const TextStyle(
fontSize: 12.0,
color: Colors.white, color: Colors.white,
), ),
), const SizedBox(height: 8.0),
], Text(
'快退${value.inSeconds}',
style: const TextStyle(
fontSize: 12.0,
color: Colors.white,
),
),
],
),
), ),
// ),
); );
} }
} }

View File

@@ -34,17 +34,17 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
super.dispose(); super.dispose();
} }
// void increment() { void increment() {
// timer?.cancel(); timer?.cancel();
// timer = Timer(const Duration(milliseconds: 400), () { timer = Timer(const Duration(milliseconds: 400), () {
// widget.onSubmitted.call(value); widget.onSubmitted.call(value);
// }); });
// widget.onChanged.call(value); // widget.onChanged.call(value);
// // 重复点击 快进秒数累加10 // 重复点击 快进秒数累加10
// setState(() { setState(() {
// value += const Duration(seconds: 10); value += const Duration(seconds: 10);
// }); });
// } }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@@ -59,31 +59,31 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
end: Alignment.centerRight, end: Alignment.centerRight,
), ),
), ),
// child: InkWell(
// splashColor: const Color(0x44767676),
// onTap: increment,
alignment: Alignment.center, alignment: Alignment.center,
child: Column( child: InkWell(
mainAxisSize: MainAxisSize.min, splashColor: const Color(0x44767676),
mainAxisAlignment: MainAxisAlignment.center, onTap: increment,
crossAxisAlignment: CrossAxisAlignment.center, child: Column(
children: [ mainAxisSize: MainAxisSize.min,
const Icon( mainAxisAlignment: MainAxisAlignment.center,
Icons.fast_forward, crossAxisAlignment: CrossAxisAlignment.center,
size: 24.0, children: [
color: Colors.white, const Icon(
), Icons.fast_forward,
const SizedBox(height: 8.0), size: 24.0,
Text(
'快进${value.inSeconds}',
style: const TextStyle(
fontSize: 12.0,
color: Colors.white, color: Colors.white,
), ),
), const SizedBox(height: 8.0),
], Text(
'快进${value.inSeconds}',
style: const TextStyle(
fontSize: 12.0,
color: Colors.white,
),
),
],
),
), ),
// ),
); );
} }
} }