launchAsFullscreen method

Future<void> launchAsFullscreen(
  1. BuildContext context, {
  2. required DataSource dataSource,
  3. bool autoplay = false,
  4. bool looping = false,
  5. Widget? header,
  6. Widget? bottomRight,
  7. Duration seekTo = Duration.zero,
})

launch a video using the fullscreen apge

dataSource autoplay looping

Implementation

Future<void> launchAsFullscreen(
  BuildContext context, {
  required DataSource dataSource,
  bool autoplay = false,
  bool looping = false,
  Widget? header,
  Widget? bottomRight,
  Duration seekTo = Duration.zero,
}) async {
  this.header = header;
  this.bottomRight = bottomRight;
  setDataSource(
    dataSource,
    autoplay: autoplay,
    looping: looping,
    seekTo: seekTo,
  );
  if (windows) {
    registerHotKeys();
  }
  if (!windows) {
    getUserPreferenceForBrightness();
  }
  await goToFullscreen(context);
}