chewie icon indicating copy to clipboard operation
chewie copied to clipboard

fullScreenByDefault: true triggers fullscreen twice

Open J-Dark opened this issue 3 years ago • 2 comments

fullScreenByDefault: true triggers the fullscreen again the first time you exit fullscreen. I'm using Navigator 2.0 (using Routemaster package) and maybe its related to #618. You can find a repo to reproduce the bug in this comment: https://github.com/fluttercommunity/chewie/issues/618#issuecomment-1156713212

J-Dark avatar Jun 16 '22 14:06 J-Dark

me too, Is there a solution?

d1y avatar Aug 13 '22 18:08 d1y

I used the following code and it seems to be solved 🤔

bool isInit = true;
chewieController.addListener(() {
        var isFullScreen = chewieController.isFullScreen;
        if (isFullScreen && isInit) {
          chewieController.exitFullScreen();
          setState(() {
            isInit = false;
          });
        }
      });

d1y avatar Aug 14 '22 05:08 d1y