mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 17:30:31 -07: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;
|
null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget? subtitles(bool showOverlay, {GlobalKey? menuKey}) => null;
|
Widget? subtitles(bool showOverlay, {GlobalKey? controlsKey}) => null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> setVolume(double volume) async {}
|
Future<void> setVolume(double volume) async {}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class MediaControlsWrapper extends BaseAudioHandler {
|
||||||
PlayerState? get lastState => _player?.lastState;
|
PlayerState? get lastState => _player?.lastState;
|
||||||
|
|
||||||
Widget? subtitleWidget(bool showOverlay, {GlobalKey? controlsKey}) =>
|
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);
|
Widget? videoWidget(Key key, BoxFit fit) => _player?.videoWidget(key, fit);
|
||||||
|
|
||||||
final Ref ref;
|
final Ref ref;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ abstract class BasePlayer {
|
||||||
);
|
);
|
||||||
Widget? subtitles(
|
Widget? subtitles(
|
||||||
bool showOverlay, {
|
bool showOverlay, {
|
||||||
GlobalKey? menuKey,
|
GlobalKey? controlsKey,
|
||||||
});
|
});
|
||||||
Future<void> dispose();
|
Future<void> dispose();
|
||||||
Future<void> open(String url, bool play);
|
Future<void> open(String url, bool play);
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ class LibMDK extends BasePlayer {
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget? subtitles(bool showOverlay, {GlobalKey? menuKey}) => null;
|
Widget? subtitles(bool showOverlay, {GlobalKey? controlsKey}) => null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> setVolume(double volume) async => _controller?.setVolume(volume / 100);
|
Future<void> setVolume(double volume) async => _controller?.setVolume(volume / 100);
|
||||||
|
|
|
||||||
|
|
@ -168,13 +168,13 @@ class LibMPV extends BasePlayer {
|
||||||
@override
|
@override
|
||||||
Widget? subtitles(
|
Widget? subtitles(
|
||||||
bool showOverlay, {
|
bool showOverlay, {
|
||||||
GlobalKey? menuKey,
|
GlobalKey? controlsKey,
|
||||||
}) =>
|
}) =>
|
||||||
_controller != null
|
_controller != null
|
||||||
? _VideoSubtitles(
|
? _VideoSubtitles(
|
||||||
controller: _controller!,
|
controller: _controller!,
|
||||||
showOverlay: showOverlay,
|
showOverlay: showOverlay,
|
||||||
menuKey: menuKey,
|
controlsKey: controlsKey,
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|
@ -198,12 +198,12 @@ class LibMPV extends BasePlayer {
|
||||||
class _VideoSubtitles extends ConsumerStatefulWidget {
|
class _VideoSubtitles extends ConsumerStatefulWidget {
|
||||||
final VideoController controller;
|
final VideoController controller;
|
||||||
final bool showOverlay;
|
final bool showOverlay;
|
||||||
final GlobalKey? menuKey;
|
final GlobalKey? controlsKey;
|
||||||
|
|
||||||
const _VideoSubtitles({
|
const _VideoSubtitles({
|
||||||
required this.controller,
|
required this.controller,
|
||||||
this.showOverlay = false,
|
this.showOverlay = false,
|
||||||
this.menuKey,
|
this.controlsKey,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -275,9 +275,9 @@ class _VideoSubtitlesState extends ConsumerState<_VideoSubtitles> {
|
||||||
|
|
||||||
void _measureMenuHeight() {
|
void _measureMenuHeight() {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
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;
|
final newHeight = renderBox?.size.height;
|
||||||
|
|
||||||
if (newHeight != _cachedMenuHeight && newHeight != null) {
|
if (newHeight != _cachedMenuHeight && newHeight != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue