toggleFullScreenMode method

void toggleFullScreenMode()

Implementation

void toggleFullScreenMode() {
  value.isFullScreen = !value.isFullScreen;
  if (value.isFullScreen) {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.landscapeLeft,
      DeviceOrientation.landscapeRight,
    ]);
  } else {
    SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
  }
}