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
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.
You need to dispose of your controller for the video player by calling
dispose()
.Replace your controller name with "_videoController"