toggleFullscreen method

void toggleFullscreen()

切换全屏状态

根据当前是否全屏来进入或退出全屏模式。 这是一个便捷方法,内部会自动判断当前状态并调用相应的方法。

Toggle fullscreen state.

Automatically enters or exits fullscreen mode based on current state. This is a convenience method that internally determines the current state and calls the appropriate method.

Implementation

void toggleFullscreen() {
  isFullScreenNotifier.value = !isFullScreenNotifier.value;
}