mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-04-29 19:11:45 -05:00
[podcast] Add Comment for the _player.pause() Hack
This commit is contained in:
@@ -65,6 +65,12 @@ class _ItemAudioPlayerState extends State<ItemAudioPlayer> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
/// We have to dispose the [_player] when the widget is disposed, otherwise
|
||||
/// the audio will continue to play in the background.
|
||||
///
|
||||
/// On Linux and Windows the audio will continue to play even if the
|
||||
/// [_player] is disposed, so that we also call the `pause` method of the
|
||||
/// [_player] to stop the audio.
|
||||
_player.pause();
|
||||
_player.dispose();
|
||||
super.dispose();
|
||||
|
||||
Reference in New Issue
Block a user