feat(flutter): 播放页长按手势与加速态
This commit is contained in:
1 parent
7bb2714941
commit
96074bc5e8
11 files changed
+231
-4
No files matched your search
@@ -22,6 +22,7 @@ class PlayerOverlayData {
|
||||
required this.playing,
|
||||
required this.playbackSpeed,
|
||||
required this.totalEpisodes,
|
||||
required this.boosting,
|
||||
this.authorNote = '',
|
||||
});
|
||||
|
||||
@@ -61,6 +62,9 @@ class PlayerOverlayData {
|
||||
/// 可见集数量。
|
||||
final int totalEpisodes;
|
||||
|
||||
/// 是否处于长按加速态。
|
||||
final bool boosting;
|
||||
|
||||
/// 作者声明;没有后端字段时为空。
|
||||
final String authorNote;
|
||||
}
|
||||
@@ -83,6 +87,9 @@ class PlayerOverlayActions {
|
||||
required this.onMore,
|
||||
required this.onScrubStart,
|
||||
required this.onSeek,
|
||||
required this.onLongPressCenter,
|
||||
required this.onBoostStart,
|
||||
required this.onBoostEnd,
|
||||
});
|
||||
|
||||
/// 返回上一页。
|
||||
@@ -126,4 +133,13 @@ class PlayerOverlayActions {
|
||||
|
||||
/// 提交进度跳转。
|
||||
final Future<void> Function(Duration)? onSeek;
|
||||
|
||||
/// 长按画面中间:弹出更多面板。
|
||||
final VoidCallback onLongPressCenter;
|
||||
|
||||
/// 长按画面两侧:开始加速。
|
||||
final VoidCallback onBoostStart;
|
||||
|
||||
/// 长按结束或取消:结束加速。
|
||||
final VoidCallback onBoostEnd;
|
||||
}
|
||||
Reference in new issue
Block a user