opt scroll physics

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-20 13:31:28 +08:00
parent 452b54d124
commit 480bdffdaa
59 changed files with 210 additions and 195 deletions

View File

@@ -24,6 +24,7 @@ class PlayerFocus extends StatelessWidget {
this.canPlay,
this.onSkipSegment,
this.onRefresh,
this.onDownload,
});
final Widget child;
@@ -33,6 +34,7 @@ class PlayerFocus extends StatelessWidget {
final ValueGetter<bool>? canPlay;
final ValueGetter<bool>? onSkipSegment;
final VoidCallback? onRefresh;
final VoidCallback? onDownload;
static bool _shouldHandle(LogicalKeyboardKey logicalKey) {
return logicalKey == LogicalKeyboardKey.tab ||
@@ -224,6 +226,10 @@ class PlayerFocus extends StatelessWidget {
}
return true;
case LogicalKeyboardKey.keyX:
onDownload?.call();
return true;
case LogicalKeyboardKey.enter:
if (onSkipSegment?.call() ?? false) {
return true;