mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
Renamed variable
This commit is contained in:
parent
2f83f03442
commit
0bdf123d15
5 changed files with 10 additions and 10 deletions
|
|
@ -64,7 +64,7 @@ class LibMDK extends BasePlayer {
|
|||
null;
|
||||
|
||||
@override
|
||||
Widget? subtitles(bool showOverlay, {GlobalKey? menuKey}) => null;
|
||||
Widget? subtitles(bool showOverlay, {GlobalKey? controlsKey}) => null;
|
||||
|
||||
@override
|
||||
Future<void> setVolume(double volume) async {}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class MediaControlsWrapper extends BaseAudioHandler {
|
|||
PlayerState? get lastState => _player?.lastState;
|
||||
|
||||
Widget? subtitleWidget(bool showOverlay, {GlobalKey? controlsKey}) =>
|
||||
_player?.subtitles(showOverlay, menuKey: controlsKey);
|
||||
_player?.subtitles(showOverlay, controlsKey: controlsKey);
|
||||
Widget? videoWidget(Key key, BoxFit fit) => _player?.videoWidget(key, fit);
|
||||
|
||||
final Ref ref;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ abstract class BasePlayer {
|
|||
);
|
||||
Widget? subtitles(
|
||||
bool showOverlay, {
|
||||
GlobalKey? menuKey,
|
||||
GlobalKey? controlsKey,
|
||||
});
|
||||
Future<void> dispose();
|
||||
Future<void> open(String url, bool play);
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class LibMDK extends BasePlayer {
|
|||
);
|
||||
|
||||
@override
|
||||
Widget? subtitles(bool showOverlay, {GlobalKey? menuKey}) => null;
|
||||
Widget? subtitles(bool showOverlay, {GlobalKey? controlsKey}) => null;
|
||||
|
||||
@override
|
||||
Future<void> setVolume(double volume) async => _controller?.setVolume(volume / 100);
|
||||
|
|
|
|||
|
|
@ -168,13 +168,13 @@ class LibMPV extends BasePlayer {
|
|||
@override
|
||||
Widget? subtitles(
|
||||
bool showOverlay, {
|
||||
GlobalKey? menuKey,
|
||||
GlobalKey? controlsKey,
|
||||
}) =>
|
||||
_controller != null
|
||||
? _VideoSubtitles(
|
||||
controller: _controller!,
|
||||
showOverlay: showOverlay,
|
||||
menuKey: menuKey,
|
||||
controlsKey: controlsKey,
|
||||
)
|
||||
: null;
|
||||
|
||||
|
|
@ -198,12 +198,12 @@ class LibMPV extends BasePlayer {
|
|||
class _VideoSubtitles extends ConsumerStatefulWidget {
|
||||
final VideoController controller;
|
||||
final bool showOverlay;
|
||||
final GlobalKey? menuKey;
|
||||
final GlobalKey? controlsKey;
|
||||
|
||||
const _VideoSubtitles({
|
||||
required this.controller,
|
||||
this.showOverlay = false,
|
||||
this.menuKey,
|
||||
this.controlsKey,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -275,9 +275,9 @@ class _VideoSubtitlesState extends ConsumerState<_VideoSubtitles> {
|
|||
|
||||
void _measureMenuHeight() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted || widget.menuKey == null) return;
|
||||
if (!mounted || widget.controlsKey == null) return;
|
||||
|
||||
final RenderBox? renderBox = widget.menuKey?.currentContext?.findRenderObject() as RenderBox?;
|
||||
final RenderBox? renderBox = widget.controlsKey?.currentContext?.findRenderObject() as RenderBox?;
|
||||
final newHeight = renderBox?.size.height;
|
||||
|
||||
if (newHeight != _cachedMenuHeight && newHeight != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue