I am using bottom navigation for switching tabs.
On my First tab i have the flutter_radio player.
When i start my player it works perfectly and I switch to another tab (it works in background perfectly)
But When I switch back this flutter_radio tab it looses its state and when i click play it starts playing the stream again, instead of pausing it, due to which I see two different streams playing at same time.
I am using bottom navigation for switching tabs. On my First tab i have the flutter_radio player. When i start my player it works perfectly and I switch to another tab (it works in background perfectly) But When I switch back this flutter_radio tab it looses its state and when i click play it starts playing the stream again, instead of pausing it, due to which I see two different streams playing at same time.
here is my code: