openOrCloseFullscreen method

Future<void> openOrCloseFullscreen()

Implementation

Future<void> openOrCloseFullscreen() async {
  if (!_isGoingToOpenOrCloseFullscreen) {
    _isGoingToOpenOrCloseFullscreen = true;
    if (!_isFullScreen) {
      await openFullScreen();
    } else {
      await closeFullScreen();
    }
    _isGoingToOpenOrCloseFullscreen = false;
  }
  notifyListeners();
}