goToFullscreen method

Future<void> goToFullscreen(
  1. BuildContext context, {
  2. bool applyOverlaysAndOrientations = true,
  3. bool disposePlayer = false,
})

show the player in fullscreen mode

Implementation

Future<void> goToFullscreen(BuildContext context,
    {bool applyOverlaysAndOrientations = true,
    bool disposePlayer = false}) async {
  if (applyOverlaysAndOrientations) {
    if (UniversalPlatform.isWeb) {
      screenManager.setWebFullScreen(true, this);
    } else {
      if (desktopOrWeb) {
        if (!isInPipMode.value) {
          _screenSizeBk = await windowManager.getSize();
        }
        screenManager.setWindowsFullScreen(true, this);
      } else {
        screenManager.setFullScreenOverlaysAndOrientations();
      }
    }
  }
  setVideoAsAppFullScreen(context,
      applyOverlaysAndOrientations: applyOverlaysAndOrientations,
      disposePlayer: disposePlayer);
}