mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -3,11 +3,13 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BackwardSeekIndicator extends StatefulWidget {
|
||||
// final void Function(Duration) onChanged;
|
||||
final ValueChanged<Duration> onSubmitted;
|
||||
final int duration;
|
||||
|
||||
const BackwardSeekIndicator({
|
||||
super.key,
|
||||
// required this.onChanged,
|
||||
required this.onSubmitted,
|
||||
required this.duration,
|
||||
});
|
||||
@@ -41,6 +43,8 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
|
||||
timer = Timer(const Duration(milliseconds: 400), () {
|
||||
widget.onSubmitted.call(duration);
|
||||
});
|
||||
// widget.onChanged.call(value);
|
||||
// 重复点击 快退秒数累加10
|
||||
setState(() {
|
||||
duration += Duration(seconds: widget.duration);
|
||||
});
|
||||
|
||||
@@ -50,7 +50,9 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 7),
|
||||
child: Semantics(
|
||||
// label: '${(value / max * 100).round()}%',
|
||||
value: '${(value / max * 100).round()}%',
|
||||
// enabled: false,
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.bottomCenter,
|
||||
|
||||
@@ -3,11 +3,13 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ForwardSeekIndicator extends StatefulWidget {
|
||||
// final void Function(Duration) onChanged;
|
||||
final ValueChanged<Duration> onSubmitted;
|
||||
final int duration;
|
||||
|
||||
const ForwardSeekIndicator({
|
||||
super.key,
|
||||
// required this.onChanged,
|
||||
required this.onSubmitted,
|
||||
required this.duration,
|
||||
});
|
||||
@@ -41,6 +43,8 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
|
||||
timer = Timer(const Duration(milliseconds: 400), () {
|
||||
widget.onSubmitted.call(duration);
|
||||
});
|
||||
// widget.onChanged.call(value);
|
||||
// 重复点击 快进秒数累加10
|
||||
setState(() {
|
||||
duration += Duration(seconds: widget.duration);
|
||||
});
|
||||
|
||||
@@ -77,6 +77,8 @@ class PlayOrPauseButtonState extends State<PlayOrPauseButton>
|
||||
player.playOrPause();
|
||||
}
|
||||
},
|
||||
// iconSize: widget.iconSize ?? _theme(context).buttonBarButtonSize,
|
||||
// color: widget.iconColor ?? _theme(context).buttonBarButtonColor,
|
||||
child: Center(
|
||||
child: AnimatedIcon(
|
||||
semanticLabel:
|
||||
@@ -87,6 +89,8 @@ class PlayOrPauseButtonState extends State<PlayOrPauseButton>
|
||||
icon: AnimatedIcons.play_pause,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
// size: widget.iconSize ?? _theme(context).buttonBarButtonSize,
|
||||
// color: widget.iconColor ?? _theme(context).buttonBarButtonColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user