goToFullscreen method

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

show the player in fullscreen mode

Implementation

Future<void> goToFullscreen(
  BuildContext context, {
  bool applyOverlaysAndOrientations = true,
}) async {
  if (applyOverlaysAndOrientations) {
    if (windows) {
      screenManager.setWindowsFullScreen(true, this);
    } else {
      screenManager.setFullScreenOverlaysAndOrientations();
    }
  }
  _fullscreen.value = true;
  final route = MaterialPageRoute(
    builder: (_) {
      return MeeduPlayerFullscreenPage(controller: this);
    },
  );

  await Navigator.push(context, route);
}