Automatically stop audio on widget destruction
This commit is contained in:
parent
41feac8ef5
commit
30aa018bed
@ -84,6 +84,12 @@ class _MusicPlayerState extends State<MusicPlayer> {
|
||||
await _play();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_stop();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
|
Loading…
Reference in New Issue
Block a user