I am using Ryan Heise just audio and audio service flutter packages for Radio player app. Started out using AudioPlayer() in main.dart with a StreamBuilder listening to player.icymetadatastream and controlbuttons.dart with a stream builder listening to the playbackstate for showing play/pause controls. This works fine.
Now added audio_service package for background audio and iOS control center, etc. In main.dart we initialise AudioService with an Audiohandler. The controlbuttons.dart works when using a StreamBuilder on audiohandler.playbackstate instead of player.playerStateStream.
Can someone point me in the right direction for the metadata? The player is now encapsulated in the audiohandler.dart so I cannot reference it in my StreamBuilder in main.dart listening to the icymetadatastream. How should this be done? Also how to update the audio service with icymetadata changes? Is this supposed to be done with a mediaItem?