setWindowsFullScreen method

Future<void> setWindowsFullScreen(
  1. bool state,
  2. MeeduPlayerController _
)

Implementation

Future<void> setWindowsFullScreen(bool state, MeeduPlayerController _) async {
  _.fullscreen.value = state;
  //print(await windowManager.isFullScreen());
  await windowManager.ensureInitialized();
  //await windowManager.setFullScreen(state);

  if (state) {
    await windowManager.setFullScreen(state);
  } else {
    await windowManager.setFullScreen(state);
    Size size = await windowManager.getSize();
    await windowManager.setSize(Size(size.width + 1, size.height + 1));
    //windowManager.restore();
  }
}