toggleFullscreen method

Future<void> toggleFullscreen()

Toggles fullscreen on and off.

Implementation

Future<void> toggleFullscreen() async {
  if (fullscreen.isTrue) {
    fullscreen.value = false;
    await PlatformUtils.exitFullscreen();
  } else {
    fullscreen.value = true;
    await PlatformUtils.enterFullscreen();
  }

  updateSecondaryAttach();
  applySecondaryConstraints();

  refresh();
}