How to pause flutter video(video_player plugin) when navigating from page to another

I'm using flutter video_player( plugin to play videos. But When I navigate from one page to another in flutter the video is still playing. I'm having the same problem when playing music from any other app(eg: playing music from notification while flutter video is playing). How can I pause it?

Read more here:

Content Attribution

This content was originally published by divyanshu bhargava at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: