From 71eebd0e7a1de15e00d975b6c3844195ca7c1ddb Mon Sep 17 00:00:00 2001 From: Japa Alekhin Llemos Date: Sat, 28 Sep 2019 13:35:31 +0800 Subject: [PATCH] set isPlaying to false to avoid playing a stopped bgm on app resume --- lib/bgm.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bgm.dart b/lib/bgm.dart index 419c901d0..be6bb4658 100644 --- a/lib/bgm.dart +++ b/lib/bgm.dart @@ -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(); }