mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-26 20:30:18 +08:00
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user