skip to Main Content

When opening a new page, the player continues to play this happens when I open another page at the moment the player is initializing

Tried to dispose

  • when the focus on the widget disappeared
  • when the button was pressed
  • when the screen goes out of view

none of this helps

2

Answers


  1. Chosen as BEST ANSWER

    Solution. At the moment the player is initialized, I block the route, after initialization I remove the lock and then you can go to another page by deleting the player.


  2. You need to dispose of your controller for the video player by calling dispose().

    Replace your controller name with "_videoController"

      @override
          void dispose() {
            _videoController?.dispose();
            super.dispose();
          }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search