mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 20:36:31 +08:00
set isPlaying to false to avoid playing a stopped bgm on app resume
This commit is contained in:
@ -47,6 +47,7 @@ class Bgm extends WidgetsBindingObserver {
|
||||
|
||||
/// Stops the currently playing background music track (if any).
|
||||
void stop() async {
|
||||
isPlaying = false;
|
||||
await audioPlayer.stop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user