setVideoAsAppFullScreen method

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

Implementation

Future<void> setVideoAsAppFullScreen(BuildContext context,
    {bool applyOverlaysAndOrientations = true,
    bool disposePlayer = false}) async {
  _fullscreen.value = true;

  final route = PageRouteBuilder(
    opaque: false,
    fullscreenDialog: true,
    pageBuilder: (_, __, ___) {
      return MeeduPlayerFullscreenPage(
        controller: this,
        disposePlayer: disposePlayer,
      );
    },
  );

  await Navigator.of(context).push(route);
}