Home > Blockchain >  How to stop the video player from playing when moving from one page to another
How to stop the video player from playing when moving from one page to another

Time:10-01

I am using video_player package for displaying a video. I have written the video player inside separate class. The issue is, during the video playing, when I try to close the page by pressing back button, a bottomsheet will be presented on the screen. After clicking on the bottom sheet, the user will be navigated to another page. During this process, the audio from the video_player is heard.

If we are not using bottomsheet and directly pressing backbutton, the video_player is properly disposed.

Have anyone encountered this scenario before?

CodePudding user response:

Try calling pop() before navigating to new page from bottom sheet.

Keep me posted.

  • Related