Merge branch 'main' of http://43.164.74.132:3000/hy/chatapp3-flutter
This commit is contained in:
commit
b076e43180
@ -42,6 +42,7 @@ import 'services/shop/shop_manager.dart';
|
|||||||
import 'services/theme/theme_manager.dart';
|
import 'services/theme/theme_manager.dart';
|
||||||
import 'services/auth/user_profile_manager.dart';
|
import 'services/auth/user_profile_manager.dart';
|
||||||
import 'ui_kit/theme/socialchat_theme.dart';
|
import 'ui_kit/theme/socialchat_theme.dart';
|
||||||
|
import 'ui_kit/widgets/room/effect/vapp_svga_layer_widget.dart';
|
||||||
|
|
||||||
bool _isCrashlyticsReady = false;
|
bool _isCrashlyticsReady = false;
|
||||||
|
|
||||||
@ -392,7 +393,19 @@ class _YumiApplicationState extends State<YumiApplication> {
|
|||||||
onGenerateRoute: SCLkApplication.router.generator,
|
onGenerateRoute: SCLkApplication.router.generator,
|
||||||
theme: themeManager.currentTheme,
|
theme: themeManager.currentTheme,
|
||||||
home: const SplashPage(),
|
home: const SplashPage(),
|
||||||
builder: FlutterSmartDialog.init(),
|
builder: FlutterSmartDialog.init(
|
||||||
|
builder: (context, child) {
|
||||||
|
return Stack(
|
||||||
|
fit: StackFit.expand,
|
||||||
|
children: [
|
||||||
|
child ?? const SizedBox.shrink(),
|
||||||
|
const Positioned.fill(
|
||||||
|
child: VapPlusSvgaPlayer(tag: "room_gift"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
navigatorObservers: [routeObserver],
|
navigatorObservers: [routeObserver],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -16,7 +16,6 @@ import 'package:yumi/services/audio/rtm_manager.dart';
|
|||||||
import 'package:yumi/ui_kit/widgets/room/anim/l_gift_animal_view.dart';
|
import 'package:yumi/ui_kit/widgets/room/anim/l_gift_animal_view.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/room/anim/room_entrance_screen.dart';
|
import 'package:yumi/ui_kit/widgets/room/anim/room_entrance_screen.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/room/effect/luck_gift_nomor_anim_widget.dart';
|
import 'package:yumi/ui_kit/widgets/room/effect/luck_gift_nomor_anim_widget.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/room/effect/vapp_svga_layer_widget.dart';
|
|
||||||
import 'package:yumi/ui_kit/widgets/room/room_head_widget.dart';
|
import 'package:yumi/ui_kit/widgets/room/room_head_widget.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/room/room_msg_item.dart';
|
import 'package:yumi/ui_kit/widgets/room/room_msg_item.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/room/room_online_user_widget.dart';
|
import 'package:yumi/ui_kit/widgets/room/room_online_user_widget.dart';
|
||||||
@ -156,8 +155,6 @@ class _VoiceRoomPageState extends State<VoiceRoomPage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
// _buildPlayViews(),
|
// _buildPlayViews(),
|
||||||
VapPlusSvgaPlayer(tag: "room_gift"),
|
|
||||||
|
|
||||||
///幸运礼物中奖动画
|
///幸运礼物中奖动画
|
||||||
LuckGiftNomorAnimWidget(),
|
LuckGiftNomorAnimWidget(),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -563,7 +563,7 @@ class RealTimeCommunicationManager extends ChangeNotifier {
|
|||||||
rtmProvider?.msgChatListener = null;
|
rtmProvider?.msgChatListener = null;
|
||||||
rtmProvider?.msgGiftListener = null;
|
rtmProvider?.msgGiftListener = null;
|
||||||
SCLoadingManager.show(context: context);
|
SCLoadingManager.show(context: context);
|
||||||
SCGiftVapSvgaManager().dispose();
|
SCGiftVapSvgaManager().stopPlayback();
|
||||||
SCHeartbeatUtils.scheduleHeartbeat(SCHeartbeatStatus.ONLINE.name, false);
|
SCHeartbeatUtils.scheduleHeartbeat(SCHeartbeatStatus.ONLINE.name, false);
|
||||||
SCHeartbeatUtils.cancelAnchorTimer();
|
SCHeartbeatUtils.cancelAnchorTimer();
|
||||||
rtmProvider?.cleanRoomData();
|
rtmProvider?.cleanRoomData();
|
||||||
@ -631,7 +631,7 @@ class RealTimeCommunicationManager extends ChangeNotifier {
|
|||||||
isMic = true;
|
isMic = true;
|
||||||
isMusicPlaying = false;
|
isMusicPlaying = false;
|
||||||
DataPersistence.setLastTimeRoomId("");
|
DataPersistence.setLastTimeRoomId("");
|
||||||
SCGiftVapSvgaManager().clearTasks();
|
SCGiftVapSvgaManager().stopPlayback();
|
||||||
SCRoomUtils.closeAllDialogs();
|
SCRoomUtils.closeAllDialogs();
|
||||||
SCGlobalConfig.isEntryVehicleAnimation = true;
|
SCGlobalConfig.isEntryVehicleAnimation = true;
|
||||||
SCGlobalConfig.isGiftSpecialEffects = true;
|
SCGlobalConfig.isGiftSpecialEffects = true;
|
||||||
|
|||||||
@ -464,20 +464,28 @@ class SCGiftVapSvgaManager {
|
|||||||
_pn();
|
_pn();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 释放资源
|
void stopPlayback() {
|
||||||
void dispose() {
|
_log('stopPlayback queue=${_tq.length} currentPath=${_currentTask?.path}');
|
||||||
_log('dispose queue=${_tq.length} currentPath=${_currentTask?.path}');
|
|
||||||
_dis = true;
|
|
||||||
_play = false;
|
_play = false;
|
||||||
_currentTask = null;
|
_currentTask = null;
|
||||||
|
_pause = false;
|
||||||
_tq.clear();
|
_tq.clear();
|
||||||
_preloadQueue.clear();
|
_preloadQueue.clear();
|
||||||
_queuedPreloadPaths.clear();
|
_queuedPreloadPaths.clear();
|
||||||
_activePreloadCount = 0;
|
_activePreloadCount = 0;
|
||||||
_rgc?.stop();
|
_rgc?.stop();
|
||||||
|
_rsc?.stop();
|
||||||
|
_rsc?.reset();
|
||||||
|
_rsc?.videoItem = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 释放资源
|
||||||
|
void dispose() {
|
||||||
|
_log('dispose queue=${_tq.length} currentPath=${_currentTask?.path}');
|
||||||
|
_dis = true;
|
||||||
|
stopPlayback();
|
||||||
_rgc?.dispose();
|
_rgc?.dispose();
|
||||||
_rgc = null;
|
_rgc = null;
|
||||||
_rsc?.stop();
|
|
||||||
_rsc?.dispose();
|
_rsc?.dispose();
|
||||||
_rsc = null;
|
_rsc = null;
|
||||||
}
|
}
|
||||||
@ -487,13 +495,7 @@ class SCGiftVapSvgaManager {
|
|||||||
_log(
|
_log(
|
||||||
'clearTasks queueBefore=${_tq.length} currentPath=${_currentTask?.path}',
|
'clearTasks queueBefore=${_tq.length} currentPath=${_currentTask?.path}',
|
||||||
);
|
);
|
||||||
_play = false;
|
stopPlayback();
|
||||||
_currentTask = null;
|
|
||||||
_tq.clear();
|
|
||||||
_preloadQueue.clear();
|
|
||||||
_queuedPreloadPaths.clear();
|
|
||||||
_activePreloadCount = 0;
|
|
||||||
_pause = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user