panhui 6 lat temu
rodzic
commit
60d6d60e08
1 zmienionych plików z 32 dodań i 24 usunięć
  1. 32 24
      lib/pages/roomInfo.dart

+ 32 - 24
lib/pages/roomInfo.dart

@@ -154,6 +154,10 @@ class RoomInfoState extends State<RoomInfo>
       bool success = await ScreenStreamPlugin.stop();
 
       getEndTips();
+
+      setState(() {
+       playerInfo.statusFlag=3; 
+      });
     });
   }
 
@@ -256,18 +260,18 @@ class RoomInfoState extends State<RoomInfo>
     });
     Toast.hide();
     if (res.success) {
-      roomTipsList.add( [
-        '请在此页面耐心等待,竞赛即将开始,届时玩家有10秒的时间进行确认,点击确认方可正式进入竞赛,若没有点击,则视为自动放弃此次竞赛,已支付金币概不退换'
-      ]);
-      Timer(Duration(seconds: 1), () {
-        roomTipsList.add( [
-          '游戏开始后会有弹窗提示授权进行录屏的操作,',
-          '请一定点击“确定”或“允许”此操作',
-          ',系统会自动跳转打开游戏app,若长时间没有自动跳转,请手动打开游戏app进行比赛,在游戏比赛结束后,请',
-          '一定要点击查看游戏最后的分数名次结算页面',
-          ',返回游戏主页,最后再切换到我们竞赛app中,点击完成比赛,方可成功长传本次成绩,赢取大奖,感谢你的配合'
-        ]);
-      });
+      // roomTipsList.add( [
+      //   '请在此页面耐心等待,竞赛即将开始,届时玩家有10秒的时间进行确认,点击确认方可正式进入竞赛,若没有点击,则视为自动放弃此次竞赛,已支付金币概不退换'
+      // ]);
+      // Timer(Duration(seconds: 1), () {
+      //   roomTipsList.add( [
+      //     '游戏开始后会有弹窗提示授权进行录屏的操作,',
+      //     '请一定点击“确定”或“允许”此操作',
+      //     ',系统会自动跳转打开游戏app,若长时间没有自动跳转,请手动打开游戏app进行比赛,在游戏比赛结束后,请',
+      //     '一定要点击查看游戏最后的分数名次结算页面',
+      //     ',返回游戏主页,最后再切换到我们竞赛app中,点击完成比赛,方可成功长传本次成绩,赢取大奖,感谢你的配合'
+      //   ]);
+      // });
 
       Toast.show(context, '加入成功', 1500, 'success');
       if (isPop) {
@@ -436,8 +440,9 @@ class RoomInfoState extends State<RoomInfo>
                   physics: AlwaysScrollableScrollPhysics(),
                   child: ConstrainedBox(
                     constraints: BoxConstraints(
-                        minHeight: viewportConstraints.maxHeight,
-                        maxHeight: viewportConstraints.maxHeight),
+                        minHeight: 600,
+                        maxHeight: viewportConstraints.maxHeight>600?viewportConstraints.maxHeight:600
+                        ),
                     child: IntrinsicHeight(
                       child: Column(
                         children: <Widget>[
@@ -710,24 +715,27 @@ class TipsListContent extends StatefulWidget {
 class TipsListContentState extends State<TipsListContent> {
   ScrollController _scrollController;
 
+
   @override
   void initState() {
     // TODO: implement initState
     super.initState();
     _scrollController=new ScrollController();
+
+  
   }
 
-  // @override
-  // void didUpdateWidget(TipsListContent oldWidget) {
-  //   // TODO: implement didChangeDependencies
-  //   super.didUpdateWidget(oldWidget);
-  //   print('updtae:' + widget.tipsList.length.toString());
-  //   _scrollController.animateTo(_scrollController.positions.length*1.0,
-  //           duration: new Duration(seconds: 2), curve: Curves.ease);
+  @override
+  void didUpdateWidget(TipsListContent oldWidget) {
+    // TODO: implement didChangeDependencies
+    super.didUpdateWidget(oldWidget);
+    print('updtae:' + widget.tipsList.length.toString());
+    _scrollController.animateTo(200.0*widget.tipsList.length,
+            duration: new Duration(seconds: 2), curve: Curves.ease);
 
-  //   // _scrollController.position.pixels=_scrollController.position
-  //   // _scrollController.
-  // }
+    // _scrollController.position.pixels=_scrollController.position
+    // _scrollController.
+  }
 
   @override
   Widget build(BuildContext context) {