Commit 2d6bce990e6e578d3ebda156017602af3bfba8a0
1 parent
c6597bcf
feat:fix挤下线后背景音乐未暂停问题
Showing
1 changed file
with
3 additions
and
0 deletions
lib/common/core/user_util.dart
@@ -7,6 +7,8 @@ import 'package:wow_english/models/user_entity.dart'; | @@ -7,6 +7,8 @@ import 'package:wow_english/models/user_entity.dart'; | ||
7 | import 'package:wow_english/route/route.dart'; | 7 | import 'package:wow_english/route/route.dart'; |
8 | import 'package:wow_english/utils/sp_util.dart'; | 8 | import 'package:wow_english/utils/sp_util.dart'; |
9 | 9 | ||
10 | +import '../../utils/audio_player_util.dart'; | ||
11 | + | ||
10 | class UserUtil { | 12 | class UserUtil { |
11 | static UserEntity? _userEntity; | 13 | static UserEntity? _userEntity; |
12 | 14 | ||
@@ -60,6 +62,7 @@ class UserUtil { | @@ -60,6 +62,7 @@ class UserUtil { | ||
60 | Navigator.of(AppRouter.context).pushNamedAndRemoveUntil(AppRouteName.login, (route) => false); | 62 | Navigator.of(AppRouter.context).pushNamedAndRemoveUntil(AppRouteName.login, (route) => false); |
61 | }*/ | 63 | }*/ |
62 | UmengCommonSdk.onProfileSignOff(); | 64 | UmengCommonSdk.onProfileSignOff(); |
65 | + AudioPlayerUtil.getInstance().pause(); | ||
63 | pushNamedAndRemoveUntil(AppRouteName.login, (route) => false, arguments: {'showPasswordPage': showPasswordLoginPage}); | 66 | pushNamedAndRemoveUntil(AppRouteName.login, (route) => false, arguments: {'showPasswordPage': showPasswordLoginPage}); |
64 | } | 67 | } |
65 | 68 |