darwin-morocho / flutter-meedu-player

MIT License
21 stars 13 forks source link

How to disable status bar? #41

Open dheerajbred opened 3 years ago

dheerajbred commented 3 years ago

This is my code

  void playMeedu(String vidUrl,) async {
    final MeeduPlayerController _meeduPlayerController = MeeduPlayerController(
    colorTheme: Colors.red,
    pipEnabled: true,
    showPipButton: true,
    controlsStyle: ControlsStyle.primary,
    screenManager: ScreenManager(
      forceLandScapeInFullscreen: true,
    ),
    enabledButtons: EnabledButtons(fullscreen: false, muteAndSound: true, pip: true,)
    );
    DataSource _dataSource = DataSource(
        source: 'https://movietrailers.apple.com/movies/paramount/the-spongebob-movie-sponge-on-the-run/the-spongebob-movie-sponge-on-the-run-big-game_h720p.mov',
        type: DataSourceType.network,
      );
    await _meeduPlayerController.launchAsFullscreen(
            Get.context,
            dataSource: _dataSource,
            autoplay: true,
            //header: header,
            //bottomRight: nextButton,
          );

         // SystemChrome.setEnabledSystemUIOverlays([]);
          }

How to remove the statusbar?

image

darwin-morocho commented 3 years ago

hi @dheerajbred flutter must hide the status bar using

 SystemChrome.setEnabledSystemUIOverlays([]);

Also the code above only works with certain devices.