mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-16 10:46:00 -07:00
feat(Desktop): Added double tap full-screen support (#178)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
e0e06e0064
commit
5acce21261
2 changed files with 58 additions and 53 deletions
|
|
@ -69,8 +69,6 @@ class HomeScreen extends ConsumerWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return HeroControllerScope(
|
return HeroControllerScope(
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,6 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
||||||
closePlayer();
|
closePlayer();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () => toggleOverlay(),
|
|
||||||
child: MouseRegion(
|
child: MouseRegion(
|
||||||
cursor: showOverlay ? SystemMouseCursors.basic : SystemMouseCursors.none,
|
cursor: showOverlay ? SystemMouseCursors.basic : SystemMouseCursors.none,
|
||||||
onExit: (event) => toggleOverlay(value: false),
|
onExit: (event) => toggleOverlay(value: false),
|
||||||
|
|
@ -130,6 +128,16 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
||||||
onHover: AdaptiveLayout.of(context).isDesktop ? (event) => toggleOverlay(value: true) : null,
|
onHover: AdaptiveLayout.of(context).isDesktop ? (event) => toggleOverlay(value: true) : null,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
|
Positioned.fill(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: AdaptiveLayout.of(context).inputDevice == InputDevice.pointer
|
||||||
|
? () => player.playOrPause()
|
||||||
|
: () => toggleOverlay(),
|
||||||
|
onDoubleTap: AdaptiveLayout.of(context).inputDevice == InputDevice.pointer
|
||||||
|
? () => toggleFullScreen(ref)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
if (subtitleWidget != null) subtitleWidget,
|
if (subtitleWidget != null) subtitleWidget,
|
||||||
if (AdaptiveLayout.of(context).isDesktop)
|
if (AdaptiveLayout.of(context).isDesktop)
|
||||||
Consumer(builder: (context, ref, child) {
|
Consumer(builder: (context, ref, child) {
|
||||||
|
|
@ -178,7 +186,6 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue