Skip to content

Commit 9f01afd

Browse files
author
liuchuancong
committed
fix(*)
1 parent cd97ef4 commit 9f01afd

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

lib/main.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ class _MyAppState extends State<MyApp> with DesktopWindowMixin {
3737
DesktopManager.initializeListeners(this);
3838
}
3939
initShareM3uState();
40-
initGlopalPlayer();
40+
// 延迟初始化, 防止出现闪退
41+
Future.delayed(Duration(seconds: 3)).then((value) async {
42+
await initGlopalPlayer();
43+
});
4144
}
4245

4346
Future<void> initGlopalPlayer() async {

lib/modules/live_play/play_other.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class _PlayOtherState extends State<PlayOther> {
5757
insetPadding: const EdgeInsets.all(16.0),
5858
clipBehavior: Clip.hardEdge,
5959
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
60-
child: SizedBox(
61-
width: 500,
60+
child: Container(
61+
constraints: BoxConstraints(maxWidth: 500, maxHeight: 400),
6262
child: Column(
6363
mainAxisSize: MainAxisSize.min,
6464
children: [
@@ -77,8 +77,7 @@ class _PlayOtherState extends State<PlayOther> {
7777
],
7878
),
7979
),
80-
SizedBox(
81-
height: 300,
80+
Expanded(
8281
child: Obx(
8382
() => loadingFinish.value
8483
? ListView.builder(

0 commit comments

Comments
 (0)