Add toggle fullscreen with double tap (#163)

This commit is contained in:
Tommy Chow 2022-07-28 18:06:24 -04:00 • committed by GitHub
parent 334f353af1
commit ffd3d9c5ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,6 +89,12 @@ class _VideoChatState extends State<VideoChat> {
final overlay = GestureDetector(
onLongPress: _videoStore.handleToggleOverlay,
onDoubleTap: () {
if (MediaQuery.of(context).orientation == Orientation.portrait) return;
// Double tap to toggle fullscreen in landscape mode.
settingsStore.fullScreen = !settingsStore.fullScreen;
},
onTap: () {
if (_chatStore.assetsStore.showEmoteMenu) {
_chatStore.assetsStore.showEmoteMenu = false;