Explorar el Código

remove all log

x1ongzhu hace 6 años
padre
commit
b97e017514

+ 15 - 44
lib/pages/BindGame.dart

@@ -20,14 +20,10 @@ class BindGameState extends State<BindGame> {
 
 
   void getBindInfo() async {
   void getBindInfo() async {
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("bindGame/all", data: {
-      "gameId": 1,
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id
-    });
+    Result res = await HttpManager.get("bindGame/all", data: {"gameId": 1, "userId": StoreProvider.of<AppState>(context).state.userInfo.id});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       if (res.data.length > 0) {
       if (res.data.length > 0) {
-        print(res.data[0]);
         setState(() {
         setState(() {
           isBind = true;
           isBind = true;
           bindInfo = BindGameInfo.fromJson(res.data[0]);
           bindInfo = BindGameInfo.fromJson(res.data[0]);
@@ -43,7 +39,7 @@ class BindGameState extends State<BindGame> {
   @override
   @override
   void initState() {
   void initState() {
     super.initState();
     super.initState();
-    Future.delayed(Duration(milliseconds: 50), () {
+    Future.delayed(Duration.zero, () {
       getBindInfo();
       getBindInfo();
     });
     });
   }
   }
@@ -54,30 +50,22 @@ class BindGameState extends State<BindGame> {
       return;
       return;
     }
     }
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.post("bindGame/save", data: {
-      "gameId": 1,
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id,
-      "nickName": bindName
-    });
+    Result res =
+        await HttpManager.post("bindGame/save", data: {"gameId": 1, "userId": StoreProvider.of<AppState>(context).state.userInfo.id, "nickName": bindName});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       Toast.show(context, '绑定成功', 1000, 'success');
       Toast.show(context, '绑定成功', 1000, 'success');
-      Future.delayed(Duration(milliseconds: 1000), () {
-        getBindInfo();
-      });
+      getBindInfo();
     } else {}
     } else {}
   }
   }
 
 
   void cancelBind() async {
   void cancelBind() async {
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
-    Result res =
-        await HttpManager.post("bindGame/del", data: {'id': bindInfo.id});
+    Result res = await HttpManager.post("bindGame/del", data: {'id': bindInfo.id});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       Toast.show(context, '解绑成功', 1000, 'success');
       Toast.show(context, '解绑成功', 1000, 'success');
-      Future.delayed(Duration(milliseconds: 1000), () {
-        getBindInfo();
-      });
+      getBindInfo();
     } else {}
     } else {}
   }
   }
 
 
@@ -99,10 +87,7 @@ class BindGameState extends State<BindGame> {
                 height: 220,
                 height: 220,
                 width: double.infinity,
                 width: double.infinity,
                 // padding: EdgeInsets.symmetric(vertical: 15, horizontal: 34),
                 // padding: EdgeInsets.symmetric(vertical: 15, horizontal: 34),
-                decoration: BoxDecoration(
-                    image: DecorationImage(
-                        image: AssetImage('images/img_chijizhanchang.png'),
-                        fit: BoxFit.cover)),
+                decoration: BoxDecoration(image: DecorationImage(image: AssetImage('images/img_chijizhanchang.png'), fit: BoxFit.cover)),
                 child: Column(
                 child: Column(
                   mainAxisAlignment: MainAxisAlignment.end,
                   mainAxisAlignment: MainAxisAlignment.end,
                   children: _bindWidegt(),
                   children: _bindWidegt(),
@@ -119,11 +104,8 @@ class BindGameState extends State<BindGame> {
       widgetList.add(Container(
       widgetList.add(Container(
         height: 78,
         height: 78,
         padding: EdgeInsets.all(15),
         padding: EdgeInsets.all(15),
-        decoration: BoxDecoration(
-            gradient: LinearGradient(
-                colors: [Color(0xFF464B6A), Color(0xFF35395E)],
-                begin: Alignment.topCenter,
-                end: Alignment.bottomCenter)),
+        decoration:
+            BoxDecoration(gradient: LinearGradient(colors: [Color(0xFF464B6A), Color(0xFF35395E)], begin: Alignment.topCenter, end: Alignment.bottomCenter)),
         child: Row(
         child: Row(
           children: <Widget>[
           children: <Widget>[
             Image.network(bindInfo.gameInfo.icon, width: 48),
             Image.network(bindInfo.gameInfo.icon, width: 48),
@@ -136,8 +118,7 @@ class BindGameState extends State<BindGame> {
                   mainAxisAlignment: MainAxisAlignment.center,
                   mainAxisAlignment: MainAxisAlignment.center,
                   crossAxisAlignment: CrossAxisAlignment.start,
                   crossAxisAlignment: CrossAxisAlignment.start,
                   children: <Widget>[
                   children: <Widget>[
-                    Text(bindInfo.gameInfo.gameName,
-                        style: TextStyle(color: Colors.white, fontSize: 14)),
+                    Text(bindInfo.gameInfo.gameName, style: TextStyle(color: Colors.white, fontSize: 14)),
                     Container(
                     Container(
                       height: 5,
                       height: 5,
                     ),
                     ),
@@ -145,20 +126,14 @@ class BindGameState extends State<BindGame> {
                       children: <Widget>[
                       children: <Widget>[
                         Text(
                         Text(
                           "已绑定",
                           "已绑定",
-                          style: TextStyle(
-                              color: Color(0xFF727785),
-                              fontSize: 13,
-                              fontWeight: FontWeight.w500),
+                          style: TextStyle(color: Color(0xFF727785), fontSize: 13, fontWeight: FontWeight.w500),
                         ),
                         ),
                         Container(
                         Container(
                           width: 10,
                           width: 10,
                         ),
                         ),
                         Text(
                         Text(
                           bindInfo.nickName,
                           bindInfo.nickName,
-                          style: TextStyle(
-                              color: Colors.white,
-                              fontSize: 13,
-                              fontWeight: FontWeight.w500),
+                          style: TextStyle(color: Colors.white, fontSize: 13, fontWeight: FontWeight.w500),
                         )
                         )
                       ],
                       ],
                     )
                     )
@@ -188,13 +163,9 @@ class BindGameState extends State<BindGame> {
           ),
           ),
           height: 40,
           height: 40,
           child: TextField(
           child: TextField(
-            style: TextStyle(
-                color: Color(0xFFAF4946), fontWeight: FontWeight.w500),
+            style: TextStyle(color: Color(0xFFAF4946), fontWeight: FontWeight.w500),
             textAlign: TextAlign.center,
             textAlign: TextAlign.center,
-            decoration: InputDecoration(
-                hintText: '请输入刺激战场游戏昵称',
-                border: InputBorder.none,
-                hintStyle: TextStyle(fontSize: 12, color: Color(0xFF727785))),
+            decoration: InputDecoration(hintText: '请输入刺激战场游戏昵称', border: InputBorder.none, hintStyle: TextStyle(fontSize: 12, color: Color(0xFF727785))),
             onChanged: (value) {
             onChanged: (value) {
               setState(() {
               setState(() {
                 bindName = value;
                 bindName = value;

+ 2 - 10
lib/pages/CreateRoom.dart

@@ -37,22 +37,14 @@ class _CreateRoomBtn extends StatelessWidget {
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     return GestureDetector(
     return GestureDetector(
       onTap: () {
       onTap: () {
-        print(this.title);
-        Navigator.push(
-            context,
-            new CupertinoPageRoute(
-                builder: (context) => new OpenRoom(
-                    roomFlag: this.title == '创建普通房间' ? '0' : '1')));
+        Navigator.push(context, new CupertinoPageRoute(builder: (context) => new OpenRoom(roomFlag: this.title == '创建普通房间' ? '0' : '1')));
       },
       },
       child: Container(
       child: Container(
         width: 250,
         width: 250,
         height: 96,
         height: 96,
         decoration: BoxDecoration(
         decoration: BoxDecoration(
             border: Border.all(width: 1, color: Color(0x80000000)),
             border: Border.all(width: 1, color: Color(0x80000000)),
-            gradient: LinearGradient(
-                colors: [Color(0xFF626C85), Color(0xFF3D3E6C)],
-                begin: Alignment.topCenter,
-                end: Alignment.bottomCenter)),
+            gradient: LinearGradient(colors: [Color(0xFF626C85), Color(0xFF3D3E6C)], begin: Alignment.topCenter, end: Alignment.bottomCenter)),
         child: Center(
         child: Center(
           child: Text(
           child: Text(
             title,
             title,

+ 0 - 41
lib/pages/Example.dart

@@ -1,41 +0,0 @@
-import 'package:flutter/material.dart';
-import '../styles/colors.dart';
-import 'dart:ui';
-import '../styles/totast.dart';
-
-class Rechrage extends StatefulWidget {
-  @override
-  RechrageState createState() => RechrageState();
-}
-
-class RechrageState extends State<Rechrage> {
-  @override
-  Widget build(BuildContext context) {
-    return new WillPopScope(
-        child: Scaffold(
-        appBar: AppBar(
-          backgroundColor: PRIMARY_COLOR,
-          title: Text('充值'),
-          centerTitle: true,
-          elevation:0,
-        ),
-        body: RefreshIndicator(
-          color: PRIMARY_COLOR,
-          backgroundColor: BG_COLOR,
-          onRefresh: () async {
-            await new Future.delayed(const Duration(seconds: 1));
-            
-          },
-          child: Container(
-            color: BG_COLOR,
-          ),
-        )),
-        onWillPop: () {
-          Toast.hide();
-          print("返回键点击了");
-          Navigator.pop(context);
-          return Future.value(false);
-        });
- 
-  }
-}

+ 1 - 4
lib/pages/RecordList.dart

@@ -4,7 +4,6 @@ import 'dart:ui';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/cupertino.dart';
 import '../styles/totast.dart';
 import '../styles/totast.dart';
 import '../model/PlayerInfo.dart';
 import '../model/PlayerInfo.dart';
-import '../styles/totast.dart';
 import '../net/HttpManager.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../net/Result.dart';
 import '../model/HouseInfo.dart';
 import '../model/HouseInfo.dart';
@@ -37,7 +36,6 @@ class RecordListState extends State<RecordList> {
     }
     }
     if (res.success) {
     if (res.success) {
       for (var item in res.data['pp']) {
       for (var item in res.data['pp']) {
-        print(item['houseInfo']);
         PlayerInfo tip = PlayerInfo.fromJson(item);
         PlayerInfo tip = PlayerInfo.fromJson(item);
         list.add(tip);
         list.add(tip);
       }
       }
@@ -48,7 +46,6 @@ class RecordListState extends State<RecordList> {
     setState(() {
     setState(() {
       playerList = list;
       playerList = list;
     });
     });
-    print(res.data['pp']);
   }
   }
 
 
   @override
   @override
@@ -64,7 +61,7 @@ class RecordListState extends State<RecordList> {
       }
       }
     });
     });
 
 
-    Future.delayed(Duration(milliseconds: 100), () => getListPage());
+    Future.delayed(Duration.zero, () => getListPage());
   }
   }
 
 
   @override
   @override

+ 16 - 52
lib/pages/TipInfo.dart

@@ -18,13 +18,11 @@ class TipInfo extends StatefulWidget {
 }
 }
 
 
 class TipInfoState extends State<TipInfo> {
 class TipInfoState extends State<TipInfo> {
-  SystemNotice tipInfo = SystemNotice.fromJson(
-      {'content': '', "createTime": DateTime.now().microsecondsSinceEpoch});
+  SystemNotice tipInfo = SystemNotice.fromJson({'content': '', "createTime": DateTime.now().microsecondsSinceEpoch});
   HouseInfo houseInfo;
   HouseInfo houseInfo;
   getInfo() async {
   getInfo() async {
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("systemNotice/getOne",
-        data: {'id': widget.tipId});
+    Result res = await HttpManager.get("systemNotice/getOne", data: {'id': widget.tipId});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       setState(() {
       setState(() {
@@ -33,28 +31,23 @@ class TipInfoState extends State<TipInfo> {
     }
     }
 
 
     if (tipInfo.statusFlag == 0 && tipInfo.typeFlag != 2) {
     if (tipInfo.statusFlag == 0 && tipInfo.typeFlag != 2) {
-      HttpManager.post("systemNotice/update",
-          data: {'id': tipInfo.id, "statusFlag": 1});
+      HttpManager.post("systemNotice/update", data: {'id': tipInfo.id, "statusFlag": 1});
     }
     }
 
 
-    Result res2 = await HttpManager.get("houseInfo/getOne",
-        data: {'id': tipInfo.houseId});
+    Result res2 = await HttpManager.get("houseInfo/getOne", data: {'id': tipInfo.houseId});
     if (res2.success) {
     if (res2.success) {
       setState(() {
       setState(() {
         houseInfo = HouseInfo.fromJson(res2.data);
         houseInfo = HouseInfo.fromJson(res2.data);
       });
       });
     }
     }
-
-    
   }
   }
 
 
   void updateHousInfo() {}
   void updateHousInfo() {}
 
 
   @override
   @override
   void initState() {
   void initState() {
-    
     super.initState();
     super.initState();
-    Future.delayed(Duration(milliseconds: 100), () => getInfo());
+    Future.delayed(Duration.zero, () => getInfo());
   }
   }
 
 
   @override
   @override
@@ -86,11 +79,7 @@ class TipInfoState extends State<TipInfo> {
                     children: <Widget>[
                     children: <Widget>[
                       Padding(
                       Padding(
                         padding: EdgeInsets.symmetric(vertical: 12),
                         padding: EdgeInsets.symmetric(vertical: 12),
-                        child: Text(
-                            readTimestamp(
-                                tipInfo.createTime, 'yyyy.MM.dd HH:mm:ss'),
-                            style:
-                                TextStyle(color: Colors.white24, fontSize: 13)),
+                        child: Text(readTimestamp(tipInfo.createTime, 'yyyy.MM.dd HH:mm:ss'), style: TextStyle(color: Colors.white24, fontSize: 13)),
                       ),
                       ),
                       Container(
                       Container(
                         height: 1,
                         height: 1,
@@ -106,9 +95,7 @@ class TipInfoState extends State<TipInfo> {
                     ],
                     ],
                   ),
                   ),
                 ),
                 ),
-                houseInfo != null
-                    ? houseItem(roomInfo: houseInfo, gameInfo: gameInfo)
-                    : Container(),
+                houseInfo != null ? houseItem(roomInfo: houseInfo, gameInfo: gameInfo) : Container(),
                 type == 2 && status == 0
                 type == 2 && status == 0
                     ? Container(
                     ? Container(
                         width: double.infinity,
                         width: double.infinity,
@@ -119,15 +106,11 @@ class TipInfoState extends State<TipInfo> {
                           child: Text('立即领取'),
                           child: Text('立即领取'),
                           onPressed: () async {
                           onPressed: () async {
                             Toast.show(context, '加载中', -1, 'loading');
                             Toast.show(context, '加载中', -1, 'loading');
-                            Result res = await HttpManager.post(
-                                "playerInfo/receive",
-                                data: {"id": tipInfo.playerId});
+                            Result res = await HttpManager.post("playerInfo/receive", data: {"id": tipInfo.playerId});
                             Toast.hide();
                             Toast.hide();
-                            print(res.data);
                             if (res.success) {
                             if (res.success) {
                               Toast.show(context, '领取成功', 1000, 'success');
                               Toast.show(context, '领取成功', 1000, 'success');
-                              Future.delayed(Duration(milliseconds: 1000),
-                                  () => getInfo());
+                              Future.delayed(Duration(milliseconds: 1000), () => getInfo());
                             } else {
                             } else {
                               Toast.show(context, res.error, 1000, 'info');
                               Toast.show(context, res.error, 1000, 'info');
                             }
                             }
@@ -188,34 +171,26 @@ class houseItem extends StatelessWidget {
                             maxWidth: 170,
                             maxWidth: 170,
                             child: Text(
                             child: Text(
                               roomInfo.houseName,
                               roomInfo.houseName,
-                              style: TextStyle(
-                                  color: Colors.white,
-                                  fontSize: 14,
-                                  fontWeight: FontWeight.w500),
+                              style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
                               maxLines: 1,
                               maxLines: 1,
                               overflow: TextOverflow.ellipsis,
                               overflow: TextOverflow.ellipsis,
                             ),
                             ),
                           ),
                           ),
                           Container(
                           Container(
                             margin: EdgeInsets.only(left: 6),
                             margin: EdgeInsets.only(left: 6),
-                            child: Image.network(roomInfo.houseLevel.icon,
-                                width: 14),
+                            child: Image.network(roomInfo.houseLevel.icon, width: 14),
                           ),
                           ),
                           Container(
                           Container(
                               margin: EdgeInsets.only(left: 1),
                               margin: EdgeInsets.only(left: 1),
                               child: Text(
                               child: Text(
                                 roomInfo.houseLevel.levelName,
                                 roomInfo.houseLevel.levelName,
-                                style: TextStyle(
-                                    color: Color(0xFFF9D881), fontSize: 9),
+                                style: TextStyle(color: Color(0xFFF9D881), fontSize: 9),
                               )),
                               )),
                         ],
                         ],
                       ),
                       ),
                       Text(
                       Text(
                         roomInfo.houseAbstract,
                         roomInfo.houseAbstract,
-                        style: TextStyle(
-                            fontSize: 12,
-                            fontWeight: FontWeight.w400,
-                            color: Color(0xFF9BA0AE)),
+                        style: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Color(0xFF9BA0AE)),
                         maxLines: 2,
                         maxLines: 2,
                         overflow: TextOverflow.ellipsis,
                         overflow: TextOverflow.ellipsis,
                       )
                       )
@@ -227,15 +202,8 @@ class houseItem extends StatelessWidget {
                   children: <Widget>[
                   children: <Widget>[
                     Image.asset('images/icon_renshu.png', width: 20),
                     Image.asset('images/icon_renshu.png', width: 20),
                     Text(
                     Text(
-                      (roomInfo.playerNumber != null
-                              ? roomInfo.playerNumber.toString()
-                              : '0') +
-                          '/' +
-                          roomInfo.maxNumber.toString(),
-                      style: TextStyle(
-                          fontSize: 14,
-                          fontWeight: FontWeight.w500,
-                          color: Color(0xFFB1B2C0)),
+                      (roomInfo.playerNumber != null ? roomInfo.playerNumber.toString() : '0') + '/' + roomInfo.maxNumber.toString(),
+                      style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFFB1B2C0)),
                     )
                     )
                   ],
                   ],
                 )
                 )
@@ -243,11 +211,7 @@ class houseItem extends StatelessWidget {
             ),
             ),
           ),
           ),
           onTap: () {
           onTap: () {
-            Navigator.push(
-                context,
-                new CupertinoPageRoute(
-                    builder: (context) =>
-                        new RoomInfo(roomId: roomInfo.id.toString())));
+            Navigator.push(context, new CupertinoPageRoute(builder: (context) => new RoomInfo(roomId: roomInfo.id.toString())));
           },
           },
         ),
         ),
       ),
       ),

+ 13 - 38
lib/pages/TipList.dart

@@ -23,12 +23,11 @@ class TipListState extends State<TipList> {
 
 
   void getListPage() async {
   void getListPage() async {
     isMore = false;
     isMore = false;
-    Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("systemNotice/page", data: {
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id,
-      "currentPage": currentPage,
-      "pageNumber": 20
-    });
+    if (currentPage != 1) {
+      Toast.show(context, '加载中', -1, 'loading');
+    }
+    Result res = await HttpManager.get("systemNotice/page",
+        data: {"userId": StoreProvider.of<AppState>(context).state.userInfo.id, "currentPage": currentPage, "pageNumber": 20});
     Toast.hide();
     Toast.hide();
     List<SystemNotice> list = tipList;
     List<SystemNotice> list = tipList;
     if (currentPage == 1) {
     if (currentPage == 1) {
@@ -50,12 +49,9 @@ class TipListState extends State<TipList> {
 
 
   @override
   @override
   void initState() {
   void initState() {
-    
     super.initState();
     super.initState();
     _mControll = new ScrollController();
     _mControll = new ScrollController();
-
-    Future.delayed(Duration(milliseconds: 100), () => getListPage());
-
+    Future.delayed(Duration.zero, () => getListPage());
     _mControll.addListener(() {
     _mControll.addListener(() {
       if (_mControll.position.pixels == _mControll.position.maxScrollExtent) {
       if (_mControll.position.pixels == _mControll.position.maxScrollExtent) {
         if (isMore) {
         if (isMore) {
@@ -68,7 +64,6 @@ class TipListState extends State<TipList> {
 
 
   @override
   @override
   void dispose() {
   void dispose() {
-    
     super.dispose();
     super.dispose();
     _mControll.dispose();
     _mControll.dispose();
   }
   }
@@ -87,8 +82,7 @@ class TipListState extends State<TipList> {
               color: PRIMARY_COLOR,
               color: PRIMARY_COLOR,
               backgroundColor: BG_COLOR,
               backgroundColor: BG_COLOR,
               onRefresh: () async {
               onRefresh: () async {
-                await new Future.delayed(const Duration(seconds: 1));
-                int currentPage = 1;
+                currentPage = 1;
                 getListPage();
                 getListPage();
               },
               },
               child: Container(
               child: Container(
@@ -101,19 +95,14 @@ class TipListState extends State<TipList> {
                       if (tipList.length == 0) {
                       if (tipList.length == 0) {
                         return Text(
                         return Text(
                           '数据正在火速加载中...',
                           '数据正在火速加载中...',
-                          style: TextStyle(
-                              color: Colors.white30, fontSize: 13, height: 2),
+                          style: TextStyle(color: Colors.white30, fontSize: 13, height: 2),
                           textAlign: TextAlign.center,
                           textAlign: TextAlign.center,
                         );
                         );
                       }
                       }
                       return TipItem(
                       return TipItem(
                           tipInfo: tipList[index],
                           tipInfo: tipList[index],
                           tapInfo: () async {
                           tapInfo: () async {
-                            bool res = await Navigator.push(
-                                context,
-                                new CupertinoPageRoute(
-                                    builder: (context) =>
-                                        new TipInfo(tipId: tipList[index].id)));
+                            bool res = await Navigator.push(context, new CupertinoPageRoute(builder: (context) => new TipInfo(tipId: tipList[index].id)));
                             if (res != null) {
                             if (res != null) {
                               setState(() {
                               setState(() {
                                 tipList = [];
                                 tipList = [];
@@ -127,7 +116,6 @@ class TipListState extends State<TipList> {
             )),
             )),
         onWillPop: () {
         onWillPop: () {
           Toast.hide();
           Toast.hide();
-          print("返回键点击了");
           Navigator.pop(context);
           Navigator.pop(context);
           return Future.value(false);
           return Future.value(false);
         });
         });
@@ -164,22 +152,10 @@ class TipItem extends StatelessWidget {
                   child: Row(
                   child: Row(
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
                     children: <Widget>[
                     children: <Widget>[
-                      Text(
-                          readTimestamp(
-                              tipInfo.createTime, 'yyyy.MM.dd HH:mm:ss'),
-                          style: TextStyle(
-                              color: Color(0xFF9BA0AE), fontSize: 13)),
+                      Text(readTimestamp(tipInfo.createTime, 'yyyy.MM.dd HH:mm:ss'), style: TextStyle(color: Color(0xFF9BA0AE), fontSize: 13)),
                       tipInfo.statusFlag == 0
                       tipInfo.statusFlag == 0
-                          ? Text('未读',
-                              style: TextStyle(
-                                  color: Color(0xFFC2524D),
-                                  fontSize: 13,
-                                  fontWeight: FontWeight.w600))
-                          : Text('已读',
-                              style: TextStyle(
-                                  color: Color(0xFF000000),
-                                  fontSize: 13,
-                                  fontWeight: FontWeight.w600))
+                          ? Text('未读', style: TextStyle(color: Color(0xFFC2524D), fontSize: 13, fontWeight: FontWeight.w600))
+                          : Text('已读', style: TextStyle(color: Color(0xFF000000), fontSize: 13, fontWeight: FontWeight.w600))
                     ],
                     ],
                   ),
                   ),
                 ),
                 ),
@@ -189,8 +165,7 @@ class TipItem extends StatelessWidget {
                 ),
                 ),
                 Padding(
                 Padding(
                   padding: EdgeInsets.only(top: 10, bottom: 15),
                   padding: EdgeInsets.only(top: 10, bottom: 15),
-                  child: Text(tipInfo.content,
-                      style: TextStyle(color: Colors.white, fontSize: 14)),
+                  child: Text(tipInfo.content, style: TextStyle(color: Colors.white, fontSize: 14)),
                 )
                 )
               ],
               ],
             ),
             ),

+ 6 - 18
lib/pages/loginFirst.dart

@@ -45,11 +45,7 @@ class LoginFirstState extends State<LoginFirst> {
                       ),
                       ),
                       Container(
                       Container(
                         margin: EdgeInsets.only(top: 30),
                         margin: EdgeInsets.only(top: 30),
-                        child: Text('手机快捷登录',
-                            style: TextStyle(
-                                color: Colors.white,
-                                fontSize: 28,
-                                fontWeight: FontWeight.w500)),
+                        child: Text('手机快捷登录', style: TextStyle(color: Colors.white, fontSize: 28, fontWeight: FontWeight.w500)),
                       ),
                       ),
                       Container(
                       Container(
                           margin: EdgeInsets.only(top: 20),
                           margin: EdgeInsets.only(top: 20),
@@ -57,10 +53,7 @@ class LoginFirstState extends State<LoginFirst> {
                               autofocus: true,
                               autofocus: true,
                               keyboardType: TextInputType.phone,
                               keyboardType: TextInputType.phone,
                               maxLength: 11,
                               maxLength: 11,
-                              style: TextStyle(
-                                  color: Colors.white,
-                                  fontSize: 18,
-                                  fontWeight: FontWeight.w500),
+                              style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w500),
                               decoration: InputDecoration(
                               decoration: InputDecoration(
                                   hintText: "输入手机号",
                                   hintText: "输入手机号",
                                   hintStyle: TextStyle(
                                   hintStyle: TextStyle(
@@ -83,14 +76,11 @@ class LoginFirstState extends State<LoginFirst> {
                                   //     width: 20,
                                   //     width: 20,
                                   //   ),
                                   //   ),
                                   // ),
                                   // ),
-                                  counterStyle: TextStyle(
-                                      color: BG_SUB_COLOR, fontSize: 0)),
+                                  counterStyle: TextStyle(color: BG_SUB_COLOR, fontSize: 0)),
                               onChanged: (value) {
                               onChanged: (value) {
                                 inputVal = value;
                                 inputVal = value;
                               })),
                               })),
-                      Text('未注册的手机号验证后自动创建账户',
-                          style: TextStyle(
-                              color: Color(0xFF727785), fontSize: 13)),
+                      Text('未注册的手机号验证后自动创建账户', style: TextStyle(color: Color(0xFF727785), fontSize: 13)),
                       Container(
                       Container(
                         margin: EdgeInsets.symmetric(vertical: 22),
                         margin: EdgeInsets.symmetric(vertical: 22),
                         width: double.infinity,
                         width: double.infinity,
@@ -101,15 +91,13 @@ class LoginFirstState extends State<LoginFirst> {
                           highlightColor: Color(0xFF763434),
                           highlightColor: Color(0xFF763434),
                           child: Text("下一步"),
                           child: Text("下一步"),
                           onPressed: () {
                           onPressed: () {
-                            print(inputVal);
                             if (!checkPhone(inputVal)) {
                             if (!checkPhone(inputVal)) {
                               Toast.show(context, '手机号格式错误', 1500, 'info');
                               Toast.show(context, '手机号格式错误', 1500, 'info');
                             } else {
                             } else {
                               Navigator.push(
                               Navigator.push(
                                 context,
                                 context,
                                 new CupertinoPageRoute(
                                 new CupertinoPageRoute(
-                                  builder: (context) =>
-                                      new LoginSecond(phone: inputVal),
+                                  builder: (context) => new LoginSecond(phone: inputVal),
                                 ),
                                 ),
                               );
                               );
                             }
                             }
@@ -123,7 +111,7 @@ class LoginFirstState extends State<LoginFirst> {
             ],
             ],
           ),
           ),
         )),
         )),
-        onWillPop: ()  {
+        onWillPop: () {
           Toast.hide();
           Toast.hide();
           // Navigator.pop(context);
           // Navigator.pop(context);
           return Future.value(false);
           return Future.value(false);

+ 1 - 16
lib/pages/loginSecond.dart

@@ -33,7 +33,7 @@ class LoginSecondState extends State<LoginSecond> {
   @override
   @override
   void initState() {
   void initState() {
     super.initState();
     super.initState();
-    Future.delayed(Duration(milliseconds: 100), () {
+    Future.delayed(Duration.zero, () {
       sendMsg();
       sendMsg();
     });
     });
   }
   }
@@ -196,19 +196,4 @@ class LoginSecondState extends State<LoginSecond> {
       Toast.show(context, res.error, 1500, 'info');
       Toast.show(context, res.error, 1500, 'info');
     }
     }
   }
   }
-
-  void getTime() {
-    if (sendTime == 0) {
-      setState(() {
-        isSend = false;
-      });
-    } else {
-      setState(() {
-        sendTime = sendTime - 1;
-      });
-      Future.delayed(Duration(milliseconds: 1000), () {
-        getTime();
-      });
-    }
-  }
 }
 }

+ 15 - 48
lib/pages/myWallet.dart

@@ -28,11 +28,8 @@ class MyWalletState extends State<MyWallet> {
   getWalletPage() async {
   getWalletPage() async {
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
     canNext = false;
     canNext = false;
-    Result res = await HttpManager.get("memberCoin/page", data: {
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id,
-      "currentPage": currentPage,
-      "pageNumber": 20
-    });
+    Result res = await HttpManager.get("memberCoin/page",
+        data: {"userId": StoreProvider.of<AppState>(context).state.userInfo.id, "currentPage": currentPage, "pageNumber": 20});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       if (currentPage == 1) {
       if (currentPage == 1) {
@@ -45,7 +42,6 @@ class MyWalletState extends State<MyWallet> {
       if (res.data['page']['totalNumber'] > currentPage) {
       if (res.data['page']['totalNumber'] > currentPage) {
         canNext = true;
         canNext = true;
       }
       }
-      print(walletList);
     } else {}
     } else {}
   }
   }
 
 
@@ -53,15 +49,14 @@ class MyWalletState extends State<MyWallet> {
   void initState() {
   void initState() {
     super.initState();
     super.initState();
     walletList = List<Map>();
     walletList = List<Map>();
-    Future.delayed(Duration(milliseconds: 100), () {
+    Future.delayed(Duration.zero, () {
       getWalletPage();
       getWalletPage();
     });
     });
     _controller = ScrollController();
     _controller = ScrollController();
     isShow = false;
     isShow = false;
 
 
     _controller.addListener(() {
     _controller.addListener(() {
-      if (_controller.position.pixels == _controller.position.maxScrollExtent &&
-          canNext) {
+      if (_controller.position.pixels == _controller.position.maxScrollExtent && canNext) {
         currentPage++;
         currentPage++;
         getWalletPage();
         getWalletPage();
       }
       }
@@ -213,8 +208,7 @@ class MyWalletState extends State<MyWallet> {
           width: double.infinity,
           width: double.infinity,
           child: Text(
           child: Text(
             '余额明细',
             '余额明细',
-            style: TextStyle(
-                color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
+            style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
           ),
           ),
           padding: EdgeInsets.only(
           padding: EdgeInsets.only(
             left: 15,
             left: 15,
@@ -238,15 +232,10 @@ class MyWalletState extends State<MyWallet> {
               child: Text(
               child: Text(
                 '提现',
                 '提现',
                 textAlign: TextAlign.center,
                 textAlign: TextAlign.center,
-                style: TextStyle(
-                    color: Colors.white,
-                    fontSize: 16,
-                    fontWeight: FontWeight.w500),
+                style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
               ),
               ),
             ),
             ),
-            onTap: () {
-              print('提现');
-            },
+            onTap: () {},
           ),
           ),
         ),
         ),
         Container(
         Container(
@@ -262,15 +251,10 @@ class MyWalletState extends State<MyWallet> {
                 child: Text(
                 child: Text(
                   '充值',
                   '充值',
                   textAlign: TextAlign.center,
                   textAlign: TextAlign.center,
-                  style: TextStyle(
-                      color: Colors.white,
-                      fontSize: 16,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                 )),
                 )),
             onTap: () {
             onTap: () {
-              print("充值");
-              Navigator.push(context,
-                  new CupertinoPageRoute(builder: (context) => new Rechrage()));
+              Navigator.push(context, new CupertinoPageRoute(builder: (context) => new Rechrage()));
             },
             },
           ),
           ),
         )
         )
@@ -286,11 +270,7 @@ class MyWalletState extends State<MyWallet> {
           return Container(
           return Container(
             padding: EdgeInsets.all(15),
             padding: EdgeInsets.all(15),
             decoration: BoxDecoration(
             decoration: BoxDecoration(
-              border: BorderDirectional(
-                  top: BorderSide(
-                      width: 1,
-                      color: Color(0x2E000000),
-                      style: BorderStyle.solid)),
+              border: BorderDirectional(top: BorderSide(width: 1, color: Color(0x2E000000), style: BorderStyle.solid)),
               color: BG_COLOR,
               color: BG_COLOR,
             ),
             ),
             child: Row(
             child: Row(
@@ -300,10 +280,7 @@ class MyWalletState extends State<MyWallet> {
                     width: 53,
                     width: 53,
                     child: Text(
                     child: Text(
                       walletList[index]['money'].toString(),
                       walletList[index]['money'].toString(),
-                      style: TextStyle(
-                          color: Colors.white,
-                          fontSize: 20,
-                          fontWeight: FontWeight.w500),
+                      style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w500),
                     )),
                     )),
                 Expanded(
                 Expanded(
                   flex: 1,
                   flex: 1,
@@ -314,18 +291,11 @@ class MyWalletState extends State<MyWallet> {
                         walletList[index]['remark'],
                         walletList[index]['remark'],
                         maxLines: 1,
                         maxLines: 1,
                         overflow: TextOverflow.ellipsis,
                         overflow: TextOverflow.ellipsis,
-                        style: TextStyle(
-                            color: Colors.white,
-                            fontSize: 14,
-                            fontWeight: FontWeight.w500),
+                        style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
                       ),
                       ),
                       Text(
                       Text(
-                        readTimestamp(walletList[index]['createTime'],
-                            'yyyy-MM-dd HH:mm:ss'),
-                        style: TextStyle(
-                            color: Color(0xFF727785),
-                            fontSize: 12,
-                            fontWeight: FontWeight.w400),
+                        readTimestamp(walletList[index]['createTime'], 'yyyy-MM-dd HH:mm:ss'),
+                        style: TextStyle(color: Color(0xFF727785), fontSize: 12, fontWeight: FontWeight.w400),
                       )
                       )
                     ],
                     ],
                   ),
                   ),
@@ -337,10 +307,7 @@ class MyWalletState extends State<MyWallet> {
           return Center(
           return Center(
             child: Text(
             child: Text(
               '没有更多了',
               '没有更多了',
-              style: TextStyle(
-                  color: Color(0xFF727785),
-                  fontSize: 12,
-                  fontWeight: FontWeight.w400),
+              style: TextStyle(color: Color(0xFF727785), fontSize: 12, fontWeight: FontWeight.w400),
             ),
             ),
           );
           );
         }
         }

+ 33 - 101
lib/pages/openRoom.dart

@@ -24,14 +24,9 @@ class OpenRoom extends StatefulWidget {
 
 
 class OpenRoomState extends State<OpenRoom> {
 class OpenRoomState extends State<OpenRoom> {
   TextStyle titleStyle = TextStyle(color: Colors.white, fontSize: 14);
   TextStyle titleStyle = TextStyle(color: Colors.white, fontSize: 14);
-  TextStyle valStyle =
-      TextStyle(color: Colors.white, fontSize: 15, fontWeight: FontWeight.w500);
+  TextStyle valStyle = TextStyle(color: Colors.white, fontSize: 15, fontWeight: FontWeight.w500);
 
 
-  Map<String, dynamic> editRoomInfo = {
-    "gameId": 1,
-    "houseLevel": 1,
-    "maxNumber": 10
-  };
+  Map<String, dynamic> editRoomInfo = {"gameId": 1, "houseLevel": 1, "maxNumber": 10};
   List gameList = [];
   List gameList = [];
   List levelList = [];
   List levelList = [];
 
 
@@ -63,38 +58,26 @@ class OpenRoomState extends State<OpenRoom> {
       Toast.show(context, '请选择房间等级', 1500, 'info');
       Toast.show(context, '请选择房间等级', 1500, 'info');
       return;
       return;
     }
     }
-    if (editRoomInfo['houseType'] == '1' &&
-        (editRoomInfo['gameHouseId'] == null ||
-            editRoomInfo['gameHouseId'] == '')) {
+    if (editRoomInfo['houseType'] == '1' && (editRoomInfo['gameHouseId'] == null || editRoomInfo['gameHouseId'] == '')) {
       Toast.show(context, '请录入游戏房间号', 1500, 'info');
       Toast.show(context, '请录入游戏房间号', 1500, 'info');
       return;
       return;
     }
     }
-    if (editRoomInfo['houseType'] == '1' &&
-        (editRoomInfo['gameHousePassword'] == null ||
-            editRoomInfo['gameHousePassword'] == '')) {
+    if (editRoomInfo['houseType'] == '1' && (editRoomInfo['gameHousePassword'] == null || editRoomInfo['gameHousePassword'] == '')) {
       Toast.show(context, '请录入游戏房间密码', 1500, 'info');
       Toast.show(context, '请录入游戏房间密码', 1500, 'info');
       return;
       return;
     }
     }
-    editRoomInfo['userId'] =
-        StoreProvider.of<AppState>(context).state.userInfo.id;
+    editRoomInfo['userId'] = StoreProvider.of<AppState>(context).state.userInfo.id;
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
     Result res = await HttpManager.post("houseInfo/save", data: editRoomInfo);
     Result res = await HttpManager.post("houseInfo/save", data: editRoomInfo);
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
-      HttpManager.post("houseInfo/join", data: {
-        "houseId": res.data,
-        "userId": StoreProvider.of<AppState>(context).state.userInfo.id
-      });
+      HttpManager.post("houseInfo/join", data: {"houseId": res.data, "userId": StoreProvider.of<AppState>(context).state.userInfo.id});
       Future.delayed(Duration(milliseconds: 100), () {
       Future.delayed(Duration(milliseconds: 100), () {
         Toast.show(context, '创建成功', 1500, 'success');
         Toast.show(context, '创建成功', 1500, 'success');
       });
       });
       Future.delayed(Duration(milliseconds: 1500), () {
       Future.delayed(Duration(milliseconds: 1500), () {
         Navigator.pushAndRemoveUntil(
         Navigator.pushAndRemoveUntil(
-            context,
-            new CupertinoPageRoute(
-                builder: (context) =>
-                    new RoomInfo(roomId: res.data.toString())),
-            ModalRoute.withName('/'));
+            context, new CupertinoPageRoute(builder: (context) => new RoomInfo(roomId: res.data.toString())), ModalRoute.withName('/'));
       });
       });
     } else {}
     } else {}
   }
   }
@@ -102,11 +85,10 @@ class OpenRoomState extends State<OpenRoom> {
   @override
   @override
   void initState() {
   void initState() {
     super.initState();
     super.initState();
-    print(widget.roomFlag);
     editRoomInfo['houseType'] = widget.roomFlag;
     editRoomInfo['houseType'] = widget.roomFlag;
-   
-     Future.delayed(Duration.zero, () {
-       getInfo();
+
+    Future.delayed(Duration.zero, () {
+      getInfo();
     });
     });
   }
   }
 
 
@@ -138,12 +120,10 @@ class OpenRoomState extends State<OpenRoom> {
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     Map chooseGameInfo = {};
     Map chooseGameInfo = {};
     for (var item in gameList) {
     for (var item in gameList) {
-      print(item);
       if (item['id'].toString() == editRoomInfo['gameId'].toString()) {
       if (item['id'].toString() == editRoomInfo['gameId'].toString()) {
         chooseGameInfo = item;
         chooseGameInfo = item;
       }
       }
     }
     }
-    print(chooseGameInfo);
 
 
     Map chooseLevelInfo = {};
     Map chooseLevelInfo = {};
     for (var item in levelList) {
     for (var item in levelList) {
@@ -152,8 +132,6 @@ class OpenRoomState extends State<OpenRoom> {
       }
       }
     }
     }
 
 
-    print(chooseGameInfo);
-
     return WillPopScope(
     return WillPopScope(
       child: Scaffold(
       child: Scaffold(
           appBar: AppBar(
           appBar: AppBar(
@@ -167,8 +145,7 @@ class OpenRoomState extends State<OpenRoom> {
                 child: FlatButton(
                 child: FlatButton(
                   highlightColor: PRIMARY_COLOR,
                   highlightColor: PRIMARY_COLOR,
                   padding: EdgeInsets.only(right: 0),
                   padding: EdgeInsets.only(right: 0),
-                  child: Text('规则',
-                      style: TextStyle(color: Colors.white, fontSize: 13)),
+                  child: Text('规则', style: TextStyle(color: Colors.white, fontSize: 13)),
                   onPressed: () {},
                   onPressed: () {},
                 ),
                 ),
               )
               )
@@ -194,9 +171,7 @@ class OpenRoomState extends State<OpenRoom> {
                               Expanded(
                               Expanded(
                                 flex: 1,
                                 flex: 1,
                                 child: Text(
                                 child: Text(
-                                  chooseGameInfo.containsKey('gameName')
-                                      ? chooseGameInfo['gameName']
-                                      : '',
+                                  chooseGameInfo.containsKey('gameName') ? chooseGameInfo['gameName'] : '',
                                   textAlign: TextAlign.right,
                                   textAlign: TextAlign.right,
                                   style: valStyle,
                                   style: valStyle,
                                 ),
                                 ),
@@ -247,11 +222,8 @@ class OpenRoomState extends State<OpenRoom> {
                           Padding(
                           Padding(
                             padding: EdgeInsets.only(top: 12),
                             padding: EdgeInsets.only(top: 12),
                             child: Text(
                             child: Text(
-                              editRoomInfo.containsKey('video')
-                                  ? '已选择'
-                                  : '不上传则自动使用官方默认视频',
-                              style: TextStyle(
-                                  color: Color(0xFF9BA0AE), fontSize: 13),
+                              editRoomInfo.containsKey('video') ? '已选择' : '不上传则自动使用官方默认视频',
+                              style: TextStyle(color: Color(0xFF9BA0AE), fontSize: 13),
                             ),
                             ),
                           )
                           )
                         ],
                         ],
@@ -261,16 +233,14 @@ class OpenRoomState extends State<OpenRoom> {
                     Container(
                     Container(
                       height: 60,
                       height: 60,
                       color: BG_COLOR,
                       color: BG_COLOR,
-                      padding:
-                          EdgeInsets.symmetric(horizontal: 15, vertical: 8),
+                      padding: EdgeInsets.symmetric(horizontal: 15, vertical: 8),
                       child: TextField(
                       child: TextField(
                         textAlign: TextAlign.end,
                         textAlign: TextAlign.end,
                         style: valStyle,
                         style: valStyle,
                         maxLength: 10,
                         maxLength: 10,
                         decoration: InputDecoration(
                         decoration: InputDecoration(
                             hintText: "请输入房间标题",
                             hintText: "请输入房间标题",
-                            hintStyle: TextStyle(
-                                color: Color(0xFF727785), fontSize: 13),
+                            hintStyle: TextStyle(color: Color(0xFF727785), fontSize: 13),
                             prefixIcon: Padding(
                             prefixIcon: Padding(
                               padding: EdgeInsets.symmetric(vertical: 12),
                               padding: EdgeInsets.symmetric(vertical: 12),
                               child: Text('房间标题', style: titleStyle),
                               child: Text('房间标题', style: titleStyle),
@@ -290,16 +260,14 @@ class OpenRoomState extends State<OpenRoom> {
                     Container(
                     Container(
                       height: 60,
                       height: 60,
                       color: BG_COLOR,
                       color: BG_COLOR,
-                      padding:
-                          EdgeInsets.symmetric(horizontal: 15, vertical: 8),
+                      padding: EdgeInsets.symmetric(horizontal: 15, vertical: 8),
                       child: TextField(
                       child: TextField(
                         textAlign: TextAlign.end,
                         textAlign: TextAlign.end,
                         style: valStyle,
                         style: valStyle,
                         maxLength: 15,
                         maxLength: 15,
                         decoration: InputDecoration(
                         decoration: InputDecoration(
                             hintText: "请输入房间简介",
                             hintText: "请输入房间简介",
-                            hintStyle: TextStyle(
-                                color: Color(0xFF727785), fontSize: 13),
+                            hintStyle: TextStyle(color: Color(0xFF727785), fontSize: 13),
                             prefixIcon: Padding(
                             prefixIcon: Padding(
                               padding: EdgeInsets.symmetric(vertical: 12),
                               padding: EdgeInsets.symmetric(vertical: 12),
                               child: Text('房间简介', style: titleStyle),
                               child: Text('房间简介', style: titleStyle),
@@ -333,44 +301,25 @@ class OpenRoomState extends State<OpenRoom> {
                                   mainAxisAlignment: MainAxisAlignment.end,
                                   mainAxisAlignment: MainAxisAlignment.end,
                                   children: <Widget>[
                                   children: <Widget>[
                                     Image.network(
                                     Image.network(
-                                      chooseLevelInfo.containsKey('icon')
-                                          ? chooseLevelInfo['icon']
-                                          : '',
+                                      chooseLevelInfo.containsKey('icon') ? chooseLevelInfo['icon'] : '',
                                       width: 22,
                                       width: 22,
                                     ),
                                     ),
                                     Text(
                                     Text(
-                                      chooseLevelInfo.containsKey('levelName')
-                                          ? chooseLevelInfo['levelName']
-                                          : '',
-                                      style:
-                                          TextStyle(color: Color(0xFFF9D881)),
+                                      chooseLevelInfo.containsKey('levelName') ? chooseLevelInfo['levelName'] : '',
+                                      style: TextStyle(color: Color(0xFFF9D881)),
                                     ),
                                     ),
                                     Padding(
                                     Padding(
-                                      padding:
-                                          EdgeInsets.only(left: 20, right: 2),
-                                      child: Image.asset(
-                                          'images/icon_jinbi_da_bai.png',
-                                          width: 20),
+                                      padding: EdgeInsets.only(left: 20, right: 2),
+                                      child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                                     ),
                                     ),
                                     Text(
                                     Text(
-                                      'X' +
-                                          (chooseLevelInfo
-                                                  .containsKey('entryCoin')
-                                              ? chooseLevelInfo['entryCoin']
-                                                  .toString()
-                                              : ''),
-                                      style: TextStyle(
-                                          color: Colors.white,
-                                          fontSize: 15,
-                                          fontWeight: FontWeight.w500),
+                                      'X' + (chooseLevelInfo.containsKey('entryCoin') ? chooseLevelInfo['entryCoin'].toString() : ''),
+                                      style: TextStyle(color: Colors.white, fontSize: 15, fontWeight: FontWeight.w500),
                                     )
                                     )
                                   ],
                                   ],
                                 ),
                                 ),
                               ),
                               ),
-                              Padding(
-                                  padding: EdgeInsets.only(left: 4),
-                                  child: Image.asset('images/icon_inter.png',
-                                      width: 24))
+                              Padding(padding: EdgeInsets.only(left: 4), child: Image.asset('images/icon_inter.png', width: 24))
                             ],
                             ],
                           ),
                           ),
                           onTap: () {
                           onTap: () {
@@ -402,7 +351,6 @@ class OpenRoomState extends State<OpenRoom> {
                             ],
                             ],
                           ),
                           ),
                           onTap: () {
                           onTap: () {
-                            print('111111');
                             showNumPicker(chooseLevelInfo);
                             showNumPicker(chooseLevelInfo);
                           },
                           },
                         )),
                         )),
@@ -419,27 +367,17 @@ class OpenRoomState extends State<OpenRoom> {
                           children: <Widget>[
                           children: <Widget>[
                             Padding(
                             Padding(
                               padding: EdgeInsets.only(right: 6),
                               padding: EdgeInsets.only(right: 6),
-                              child: Image.asset('images/icon_jinbi_da_bai.png',
-                                  width: 20),
+                              child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                             ),
                             ),
                             Text(
                             Text(
-                              'X' +
-                                  (chooseLevelInfo.containsKey('entryCoin')
-                                      ? chooseLevelInfo['entryCoin'].toString()
-                                      : ''),
-                              style: TextStyle(
-                                  color: Colors.white,
-                                  fontSize: 16,
-                                  fontWeight: FontWeight.w500),
+                              'X' + (chooseLevelInfo.containsKey('entryCoin') ? chooseLevelInfo['entryCoin'].toString() : ''),
+                              style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                             ),
                             ),
                             Padding(
                             Padding(
                               padding: EdgeInsets.only(left: 20),
                               padding: EdgeInsets.only(left: 20),
                               child: Text(
                               child: Text(
                                 '创建房间',
                                 '创建房间',
-                                style: TextStyle(
-                                    color: Colors.white,
-                                    fontSize: 16,
-                                    fontWeight: FontWeight.w500),
+                                style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                               ),
                               ),
                             )
                             )
                           ],
                           ],
@@ -532,13 +470,11 @@ class OpenRoomState extends State<OpenRoom> {
     for (var item in gameList) {
     for (var item in gameList) {
       _list.add(item['gameName']);
       _list.add(item['gameName']);
     }
     }
-    print(json.encode(_list));
     String PickerData = json.encode(_list);
     String PickerData = json.encode(_list);
     new Picker(
     new Picker(
         confirmText: '确定',
         confirmText: '确定',
         cancelText: "取消",
         cancelText: "取消",
-        adapter: PickerDataAdapter<String>(
-            pickerdata: new JsonDecoder().convert(PickerData)),
+        adapter: PickerDataAdapter<String>(pickerdata: new JsonDecoder().convert(PickerData)),
         changeToFirst: true,
         changeToFirst: true,
         textAlign: TextAlign.left,
         textAlign: TextAlign.left,
         columnPadding: const EdgeInsets.all(8.0),
         columnPadding: const EdgeInsets.all(8.0),
@@ -559,13 +495,11 @@ class OpenRoomState extends State<OpenRoom> {
     new Picker(
     new Picker(
         confirmText: '确定',
         confirmText: '确定',
         cancelText: "取消",
         cancelText: "取消",
-        adapter: PickerDataAdapter<String>(
-            pickerdata: new JsonDecoder().convert(PickerData)),
+        adapter: PickerDataAdapter<String>(pickerdata: new JsonDecoder().convert(PickerData)),
         changeToFirst: true,
         changeToFirst: true,
         textAlign: TextAlign.left,
         textAlign: TextAlign.left,
         columnPadding: const EdgeInsets.all(8.0),
         columnPadding: const EdgeInsets.all(8.0),
         onConfirm: (Picker picker, List value) {
         onConfirm: (Picker picker, List value) {
-          print(value);
           setState(() {
           setState(() {
             editRoomInfo['maxNumber'] = _list[value[0]];
             editRoomInfo['maxNumber'] = _list[value[0]];
           });
           });
@@ -577,13 +511,11 @@ class OpenRoomState extends State<OpenRoom> {
     for (var item in levelList) {
     for (var item in levelList) {
       _list.add(item['levelName']);
       _list.add(item['levelName']);
     }
     }
-    print(json.encode(_list));
     String PickerData = json.encode(_list);
     String PickerData = json.encode(_list);
     new Picker(
     new Picker(
         confirmText: '确定',
         confirmText: '确定',
         cancelText: "取消",
         cancelText: "取消",
-        adapter: PickerDataAdapter<String>(
-            pickerdata: new JsonDecoder().convert(PickerData)),
+        adapter: PickerDataAdapter<String>(pickerdata: new JsonDecoder().convert(PickerData)),
         changeToFirst: true,
         changeToFirst: true,
         textAlign: TextAlign.left,
         textAlign: TextAlign.left,
         columnPadding: const EdgeInsets.all(8.0),
         columnPadding: const EdgeInsets.all(8.0),

+ 38 - 140
lib/pages/rankList.dart

@@ -28,13 +28,8 @@ class RankListState extends State<RankList> {
   PlayerInfo myPlayInfo;
   PlayerInfo myPlayInfo;
 
 
   void getUserRank() async {
   void getUserRank() async {
-    print('***********');
-
-    Result res = await HttpManager.get("playerInfo/seasonUserRank", data: {
-      "seasonId": raceId,
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id
-    });
-    print(res.data);
+    Result res =
+        await HttpManager.get("playerInfo/seasonUserRank", data: {"seasonId": raceId, "userId": StoreProvider.of<AppState>(context).state.userInfo.id});
     if (res.success && res.data != null) {
     if (res.success && res.data != null) {
       setState(() {
       setState(() {
         myPlayInfo = PlayerInfo.fromJson(res.data);
         myPlayInfo = PlayerInfo.fromJson(res.data);
@@ -52,11 +47,7 @@ class RankListState extends State<RankList> {
   void getListPage() async {
   void getListPage() async {
     scrollFlag = false;
     scrollFlag = false;
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("playerInfo/seasonRankPage", data: {
-      "seasonId": raceId,
-      "currentPage": currentPage,
-      "pageNumber": 20
-    });
+    Result res = await HttpManager.get("playerInfo/seasonRankPage", data: {"seasonId": raceId, "currentPage": currentPage, "pageNumber": 20});
     Toast.hide();
     Toast.hide();
     List<PlayerInfo> list = rankList;
     List<PlayerInfo> list = rankList;
     if (currentPage == 1) {
     if (currentPage == 1) {
@@ -128,8 +119,7 @@ class RankListState extends State<RankList> {
     super.initState();
     super.initState();
     _mcontroller = ScrollController();
     _mcontroller = ScrollController();
     _mcontroller.addListener(() {
     _mcontroller.addListener(() {
-      if (_mcontroller.position.pixels ==
-          _mcontroller.position.maxScrollExtent) {
+      if (_mcontroller.position.pixels == _mcontroller.position.maxScrollExtent) {
         if (scrollFlag) {
         if (scrollFlag) {
           currentPage++;
           currentPage++;
           getListPage();
           getListPage();
@@ -137,9 +127,8 @@ class RankListState extends State<RankList> {
       }
       }
     });
     });
 
 
-    Future.delayed(Duration(milliseconds: 100), () => getUserRank());
-    
-      Future.delayed(Duration.zero, () {
+    Future.delayed(Duration.zero, () {
+      getUserRank();
       getSeasonInfo();
       getSeasonInfo();
     });
     });
   }
   }
@@ -166,11 +155,7 @@ class RankListState extends State<RankList> {
                 child: CustomScrollView(
                 child: CustomScrollView(
                   controller: _mcontroller,
                   controller: _mcontroller,
                   physics: AlwaysScrollableScrollPhysics(),
                   physics: AlwaysScrollableScrollPhysics(),
-                  slivers: <Widget>[
-                    _sliverAppBar(),
-                    _slievrToBoxAdapter(),
-                    _sliverList()
-                  ],
+                  slivers: <Widget>[_sliverAppBar(), _slievrToBoxAdapter(), _sliverList()],
                 )),
                 )),
           ),
           ),
           floatingActionButton: myPlayInfo == null
           floatingActionButton: myPlayInfo == null
@@ -188,42 +173,28 @@ class RankListState extends State<RankList> {
                       Container(
                       Container(
                         width: 30,
                         width: 30,
                         height: 30,
                         height: 30,
-                        child: CircleAvatar(
-                            backgroundImage:
-                                NetworkImage(myPlayInfo.userInfo.icon ?? '')),
+                        child: CircleAvatar(backgroundImage: NetworkImage(myPlayInfo.userInfo.icon ?? '')),
                       ),
                       ),
                       Padding(
                       Padding(
                         padding: EdgeInsets.symmetric(horizontal: 10),
                         padding: EdgeInsets.symmetric(horizontal: 10),
-                        child: Text(myPlayInfo.userInfo.nickname ?? '',
-                            style:
-                                TextStyle(color: Colors.white, fontSize: 14)),
+                        child: Text(myPlayInfo.userInfo.nickname ?? '', style: TextStyle(color: Colors.white, fontSize: 14)),
                       ),
                       ),
                       Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                       Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                       Padding(
                       Padding(
                         padding: EdgeInsets.only(left: 2),
                         padding: EdgeInsets.only(left: 2),
-                        child: Text((myPlayInfo.bonus ?? 0).toString(),
-                            style: TextStyle(
-                                color: Colors.white,
-                                fontSize: 14,
-                                fontWeight: FontWeight.w500)),
+                        child: Text((myPlayInfo.bonus ?? 0).toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500)),
                       ),
                       ),
                       myPlayInfo.rank == null
                       myPlayInfo.rank == null
                           ? Container()
                           ? Container()
                           : Expanded(
                           : Expanded(
                               flex: 1,
                               flex: 1,
-                              child: Text(
-                                  '第 ' + myPlayInfo.rank.toString() + ' 名',
-                                  style: TextStyle(
-                                      color: Colors.white,
-                                      fontSize: 14,
-                                      fontWeight: FontWeight.w500),
-                                  textAlign: TextAlign.right),
+                              child: Text('第 ' + myPlayInfo.rank.toString() + ' 名',
+                                  style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500), textAlign: TextAlign.right),
                             )
                             )
                     ],
                     ],
                   ),
                   ),
                 ),
                 ),
-          floatingActionButtonLocation:
-              FloatingActionButtonLocation.centerDocked,
+          floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
         ),
         ),
         onWillPop: () {
         onWillPop: () {
           Toast.hide();
           Toast.hide();
@@ -251,10 +222,7 @@ class RankListState extends State<RankList> {
                 children: <Widget>[
                 children: <Widget>[
                   Text(
                   Text(
                     competitionSeason != null ? competitionSeason.season : '',
                     competitionSeason != null ? competitionSeason.season : '',
-                    style: TextStyle(
-                        color: Colors.white,
-                        fontSize: 13,
-                        fontWeight: FontWeight.w400),
+                    style: TextStyle(color: Colors.white, fontSize: 13, fontWeight: FontWeight.w400),
                   ),
                   ),
                   Image.asset(
                   Image.asset(
                     'images/icon_zhankai_baise.png',
                     'images/icon_zhankai_baise.png',
@@ -273,8 +241,7 @@ class RankListState extends State<RankList> {
               },
               },
               itemBuilder: (BuildContext context) {
               itemBuilder: (BuildContext context) {
                 return seasonList.map((choice) {
                 return seasonList.map((choice) {
-                  return new PopupMenuItem(
-                      child: new Text(choice.season), value: choice.id);
+                  return new PopupMenuItem(child: new Text(choice.season), value: choice.id);
                 }).toList();
                 }).toList();
               }),
               }),
         ],
         ],
@@ -304,12 +271,7 @@ class RankListState extends State<RankList> {
               padding: EdgeInsets.symmetric(horizontal: 15),
               padding: EdgeInsets.symmetric(horizontal: 15),
               child: Container(
               child: Container(
                 height: 36,
                 height: 36,
-                decoration: BoxDecoration(
-                    border: Border(
-                        bottom: BorderSide(
-                            width: 1,
-                            color: Colors.black26,
-                            style: BorderStyle.solid))),
+                decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 1, color: Colors.black26, style: BorderStyle.solid))),
                 child: Row(
                 child: Row(
                   children: <Widget>[
                   children: <Widget>[
                     Container(
                     Container(
@@ -317,8 +279,7 @@ class RankListState extends State<RankList> {
                       height: 36,
                       height: 36,
                       margin: EdgeInsets.only(right: 15),
                       margin: EdgeInsets.only(right: 15),
                       child: CircleAvatar(
                       child: CircleAvatar(
-                        backgroundImage:
-                            NetworkImage(rankList[index].userInfo.icon),
+                        backgroundImage: NetworkImage(rankList[index].userInfo.icon),
                       ),
                       ),
                     ),
                     ),
                     Expanded(
                     Expanded(
@@ -328,15 +289,10 @@ class RankListState extends State<RankList> {
                         crossAxisAlignment: CrossAxisAlignment.start,
                         crossAxisAlignment: CrossAxisAlignment.start,
                         children: <Widget>[
                         children: <Widget>[
                           Text(rankList[index].userInfo.nickname,
                           Text(rankList[index].userInfo.nickname,
-                              style: TextStyle(
-                                  color: PRIMARY_COLOR,
-                                  fontSize: 14,
-                                  height: 1.2),
-                              overflow: TextOverflow.ellipsis),
+                              style: TextStyle(color: PRIMARY_COLOR, fontSize: 14, height: 1.2), overflow: TextOverflow.ellipsis),
                           Row(
                           Row(
                             children: <Widget>[
                             children: <Widget>[
-                              Image.asset('images/icon_jinbi_da_bai.png',
-                                  width: 20),
+                              Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                               Padding(
                               Padding(
                                 padding: EdgeInsets.only(left: 2),
                                 padding: EdgeInsets.only(left: 2),
                                 child: Text(rankList[index].bonus.toString(),
                                 child: Text(rankList[index].bonus.toString(),
@@ -356,18 +312,10 @@ class RankListState extends State<RankList> {
                             width: 30,
                             width: 30,
                             height: 30,
                             height: 30,
                             margin: EdgeInsets.only(right: 33),
                             margin: EdgeInsets.only(right: 33),
-                            decoration: BoxDecoration(
-                                image: DecorationImage(
-                                    image: AssetImage(
-                                        'images/icon_paihangbang_04.png'),
-                                    fit: BoxFit.cover)),
+                            decoration: BoxDecoration(image: DecorationImage(image: AssetImage('images/icon_paihangbang_04.png'), fit: BoxFit.cover)),
                             child: Text(
                             child: Text(
                               (index + 1).toString(),
                               (index + 1).toString(),
-                              style: TextStyle(
-                                  color: Color(0xFF15151D),
-                                  fontSize: 12,
-                                  fontWeight: FontWeight.w500,
-                                  height: 2),
+                              style: TextStyle(color: Color(0xFF15151D), fontSize: 12, fontWeight: FontWeight.w500, height: 2),
                               textAlign: TextAlign.center,
                               textAlign: TextAlign.center,
                             ),
                             ),
                           )
                           )
@@ -417,27 +365,15 @@ class RankListState extends State<RankList> {
                             begin: Alignment.topLeft,
                             begin: Alignment.topLeft,
                             colors: [Color(0xFFFECF01), Color(0xFFD48E00)],
                             colors: [Color(0xFFFECF01), Color(0xFFD48E00)],
                           ),
                           ),
-                          boxShadow: [
-                            BoxShadow(
-                                color: Colors.black12,
-                                offset: Offset(2.0, 4.0),
-                                blurRadius: 4.0)
-                          ]),
-                      child: CircleAvatar(
-                          backgroundImage:
-                              NetworkImage(rankList[0].userInfo.icon))),
-                  Positioned(
-                      bottom: 0,
-                      left: 24,
-                      child: Image.asset('images/icon_paihangbang_01.png',
-                          width: 32))
+                          boxShadow: [BoxShadow(color: Colors.black12, offset: Offset(2.0, 4.0), blurRadius: 4.0)]),
+                      child: CircleAvatar(backgroundImage: NetworkImage(rankList[0].userInfo.icon))),
+                  Positioned(bottom: 0, left: 24, child: Image.asset('images/icon_paihangbang_01.png', width: 32))
                 ],
                 ],
               ),
               ),
             ),
             ),
             Padding(
             Padding(
               padding: EdgeInsets.only(top: 7, bottom: 3),
               padding: EdgeInsets.only(top: 7, bottom: 3),
-              child: Text(rankList[0].userInfo.nickname,
-                  style: TextStyle(color: Color(0xFF2E3049), fontSize: 14)),
+              child: Text(rankList[0].userInfo.nickname, style: TextStyle(color: Color(0xFF2E3049), fontSize: 14)),
             ),
             ),
             Row(
             Row(
               children: <Widget>[
               children: <Widget>[
@@ -445,11 +381,7 @@ class RankListState extends State<RankList> {
                   padding: EdgeInsets.only(right: 2),
                   padding: EdgeInsets.only(right: 2),
                   child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                   child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                 ),
                 ),
-                Text(rankList[0].bonus.toString(),
-                    style: TextStyle(
-                        color: Colors.white,
-                        fontSize: 14,
-                        fontWeight: FontWeight.w500))
+                Text(rankList[0].bonus.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
               ],
               ],
             )
             )
           ],
           ],
@@ -474,46 +406,28 @@ class RankListState extends State<RankList> {
                           width: 70,
                           width: 70,
                           height: 70,
                           height: 70,
                           decoration: BoxDecoration(
                           decoration: BoxDecoration(
-                              borderRadius:
-                                  BorderRadius.all(Radius.circular(70)),
+                              borderRadius: BorderRadius.all(Radius.circular(70)),
                               gradient: LinearGradient(
                               gradient: LinearGradient(
                                 begin: Alignment.topLeft,
                                 begin: Alignment.topLeft,
                                 colors: [Color(0xFFE3E3E3), Color(0xFFC5C5C5)],
                                 colors: [Color(0xFFE3E3E3), Color(0xFFC5C5C5)],
                               ),
                               ),
-                              boxShadow: [
-                                BoxShadow(
-                                    color: Colors.black12,
-                                    offset: Offset(2.0, 4.0),
-                                    blurRadius: 4.0)
-                              ]),
-                          child: CircleAvatar(
-                              backgroundImage:
-                                  NetworkImage(rankList[1].userInfo.icon))),
-                      Positioned(
-                          bottom: 0,
-                          left: 19,
-                          child: Image.asset('images/icon_paihangbang_02.png',
-                              width: 32))
+                              boxShadow: [BoxShadow(color: Colors.black12, offset: Offset(2.0, 4.0), blurRadius: 4.0)]),
+                          child: CircleAvatar(backgroundImage: NetworkImage(rankList[1].userInfo.icon))),
+                      Positioned(bottom: 0, left: 19, child: Image.asset('images/icon_paihangbang_02.png', width: 32))
                     ],
                     ],
                   ),
                   ),
                 ),
                 ),
                 Padding(
                 Padding(
                   padding: EdgeInsets.only(top: 7, bottom: 3),
                   padding: EdgeInsets.only(top: 7, bottom: 3),
-                  child: Text(rankList[1].userInfo.nickname,
-                      style: TextStyle(color: Color(0xFF2E3049), fontSize: 14)),
+                  child: Text(rankList[1].userInfo.nickname, style: TextStyle(color: Color(0xFF2E3049), fontSize: 14)),
                 ),
                 ),
                 Row(
                 Row(
                   children: <Widget>[
                   children: <Widget>[
                     Padding(
                     Padding(
                       padding: EdgeInsets.only(right: 2),
                       padding: EdgeInsets.only(right: 2),
-                      child: Image.asset('images/icon_jinbi_da_bai.png',
-                          width: 20),
+                      child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                     ),
                     ),
-                    Text(rankList[1].bonus.toString(),
-                        style: TextStyle(
-                            color: Colors.white,
-                            fontSize: 14,
-                            fontWeight: FontWeight.w500))
+                    Text(rankList[1].bonus.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
                   ],
                   ],
                 )
                 )
               ],
               ],
@@ -541,27 +455,15 @@ class RankListState extends State<RankList> {
                             begin: Alignment.topLeft,
                             begin: Alignment.topLeft,
                             colors: [Color(0xFFF89E58), Color(0xFFE77023)],
                             colors: [Color(0xFFF89E58), Color(0xFFE77023)],
                           ),
                           ),
-                          boxShadow: [
-                            BoxShadow(
-                                color: Colors.black12,
-                                offset: Offset(2.0, 4.0),
-                                blurRadius: 4.0)
-                          ]),
-                      child: CircleAvatar(
-                          backgroundImage:
-                              NetworkImage(rankList[2].userInfo.icon))),
-                  Positioned(
-                      bottom: 0,
-                      left: 19,
-                      child: Image.asset('images/icon_paihangbang_03.png',
-                          width: 32))
+                          boxShadow: [BoxShadow(color: Colors.black12, offset: Offset(2.0, 4.0), blurRadius: 4.0)]),
+                      child: CircleAvatar(backgroundImage: NetworkImage(rankList[2].userInfo.icon))),
+                  Positioned(bottom: 0, left: 19, child: Image.asset('images/icon_paihangbang_03.png', width: 32))
                 ],
                 ],
               ),
               ),
             ),
             ),
             Padding(
             Padding(
               padding: EdgeInsets.only(top: 7, bottom: 3),
               padding: EdgeInsets.only(top: 7, bottom: 3),
-              child: Text(rankList[2].userInfo.nickname,
-                  style: TextStyle(color: Color(0xFF2E3049), fontSize: 14)),
+              child: Text(rankList[2].userInfo.nickname, style: TextStyle(color: Color(0xFF2E3049), fontSize: 14)),
             ),
             ),
             Row(
             Row(
               children: <Widget>[
               children: <Widget>[
@@ -569,11 +471,7 @@ class RankListState extends State<RankList> {
                   padding: EdgeInsets.only(right: 2),
                   padding: EdgeInsets.only(right: 2),
                   child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                   child: Image.asset('images/icon_jinbi_da_bai.png', width: 20),
                 ),
                 ),
-                Text(rankList[2].bonus.toString(),
-                    style: TextStyle(
-                        color: Colors.white,
-                        fontSize: 14,
-                        fontWeight: FontWeight.w500))
+                Text(rankList[2].bonus.toString(), style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500))
               ],
               ],
             )
             )
           ],
           ],

+ 0 - 10
lib/pages/roomInfo.dart

@@ -98,7 +98,6 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     bool success = true;
     bool success = true;
     if (result) {
     if (result) {
       success = await ScreenStreamPlugin.start('rtmp://47.96.141.102:1935/myapp/' + playerInfo.userId.toString() + '?playerInfoId=' + playerInfo.id.toString());
       success = await ScreenStreamPlugin.start('rtmp://47.96.141.102:1935/myapp/' + playerInfo.userId.toString() + '?playerInfoId=' + playerInfo.id.toString());
-      print('stream screen:' + success.toString());
       if (success) {
       if (success) {
         data['statusFlag'] = 2;
         data['statusFlag'] = 2;
       } else {
       } else {
@@ -157,7 +156,6 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                   Toast.show(context, '加载中', -1, 'loading');
                   Toast.show(context, '加载中', -1, 'loading');
                   HttpManager.post("playerInfo/update", data: {'id': playerInfo.id, 'statusFlag': 3});
                   HttpManager.post("playerInfo/update", data: {'id': playerInfo.id, 'statusFlag': 3});
                   bool success = await ScreenStreamPlugin.stop();
                   bool success = await ScreenStreamPlugin.stop();
-                  print('stop stream screen:' + success.toString());
                   Toast.hide();
                   Toast.hide();
                   Navigator.of(context).pop();
                   Navigator.of(context).pop();
                 },
                 },
@@ -216,7 +214,6 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
         );
         );
       },
       },
     ).then((val) {
     ).then((val) {
-      print(val);
       Navigator.of(context).pop();
       Navigator.of(context).pop();
     });
     });
   }
   }
@@ -225,7 +222,6 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
   checkJoinInfo() async {
   checkJoinInfo() async {
     Result res = await HttpManager.get("playerInfo/getOne", data: {"userId": StoreProvider.of<AppState>(context).state.userInfo.id, "houseId": widget.roomId});
     Result res = await HttpManager.get("playerInfo/getOne", data: {"userId": StoreProvider.of<AppState>(context).state.userInfo.id, "houseId": widget.roomId});
     if (res.success) {
     if (res.success) {
-      print(res.data);
       if (res.data == null) {
       if (res.data == null) {
         if (isPop) {
         if (isPop) {
           return;
           return;
@@ -517,10 +513,6 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     int statusFlag = houseInfo != null ? houseInfo.statusFlag : 1;
     int statusFlag = houseInfo != null ? houseInfo.statusFlag : 1;
     int playerStatus = playerInfo != null ? playerInfo.statusFlag : 0;
     int playerStatus = playerInfo != null ? playerInfo.statusFlag : 0;
 
 
-    print('*******');
-    print(statusFlag);
-    print(playerStatus);
-
     if (!isJoin && statusFlag == 0) {
     if (!isJoin && statusFlag == 0) {
       return Container(
       return Container(
         width: ScreenUtil().setWidth(375),
         width: ScreenUtil().setWidth(375),
@@ -785,7 +777,6 @@ class SecondPageState extends State<SecondPage> {
       list = [];
       list = [];
     }
     }
     if (res.success) {
     if (res.success) {
-      print(res.data['pp']);
       for (var item in res.data['pp']) {
       for (var item in res.data['pp']) {
         PlayerInfo jonPlayer = PlayerInfo.fromJson(item);
         PlayerInfo jonPlayer = PlayerInfo.fromJson(item);
         list.add(jonPlayer);
         list.add(jonPlayer);
@@ -797,7 +788,6 @@ class SecondPageState extends State<SecondPage> {
     setState(() {
     setState(() {
       joinList = list;
       joinList = list;
     });
     });
-    print(joinList);
   }
   }
 
 
   @override
   @override

+ 14 - 40
lib/pages/roomList.dart

@@ -46,7 +46,7 @@ class RoomListState extends State<RoomList> {
   @override
   @override
   void initState() {
   void initState() {
     super.initState();
     super.initState();
-    
+
     _controller = ScrollController();
     _controller = ScrollController();
     _controller.addListener(() {
     _controller.addListener(() {
       if (_controller.position.pixels == _controller.position.maxScrollExtent) {
       if (_controller.position.pixels == _controller.position.maxScrollExtent) {
@@ -58,11 +58,10 @@ class RoomListState extends State<RoomList> {
         }
         }
       }
       }
     });
     });
-   Future.delayed(Duration.zero, () {
-     getRoomInfo();
-       getInfo();
+    Future.delayed(Duration.zero, () {
+      getRoomInfo();
+      getInfo();
     });
     });
-   
   }
   }
 
 
   getInfo() async {
   getInfo() async {
@@ -75,11 +74,9 @@ class RoomListState extends State<RoomList> {
 
 
     Result res2 = await HttpManager.get("houseLevel/all");
     Result res2 = await HttpManager.get("houseLevel/all");
     if (res2.success) {
     if (res2.success) {
-      print(res2.data);
       setState(() {
       setState(() {
         levelList.addAll(res2.data);
         levelList.addAll(res2.data);
       });
       });
-      print(levelList);
     }
     }
   }
   }
 
 
@@ -93,7 +90,6 @@ class RoomListState extends State<RoomList> {
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
     ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
 
 
-    
     return new Scaffold(
     return new Scaffold(
         appBar: AppBar(
         appBar: AppBar(
           backgroundColor: PRIMARY_COLOR,
           backgroundColor: PRIMARY_COLOR,
@@ -126,8 +122,7 @@ class RoomListState extends State<RoomList> {
                     ),
                     ),
                     SliverFixedExtentList(
                     SliverFixedExtentList(
                       itemExtent: ScreenUtil().setWidth(78),
                       itemExtent: ScreenUtil().setWidth(78),
-                      delegate: SliverChildBuilderDelegate(
-                          (BuildContext context, int index) {
+                      delegate: SliverChildBuilderDelegate((BuildContext context, int index) {
                         return RommItem(
                         return RommItem(
                           roomInfo: roomList[index],
                           roomInfo: roomList[index],
                           hasBorder: true,
                           hasBorder: true,
@@ -153,12 +148,7 @@ class RoomListState extends State<RoomList> {
         color: Color(0xFF3A3D5C),
         color: Color(0xFF3A3D5C),
         child: Row(
         child: Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,
           mainAxisAlignment: MainAxisAlignment.spaceBetween,
-          children: <Widget>[
-            _chooseGame(),
-            _chooseHouseType(),
-            _chooseLevel(),
-            _chooseStatus()
-          ],
+          children: <Widget>[_chooseGame(), _chooseHouseType(), _chooseLevel(), _chooseStatus()],
         ),
         ),
       ),
       ),
     );
     );
@@ -168,7 +158,6 @@ class RoomListState extends State<RoomList> {
   Widget _chooseGame() {
   Widget _chooseGame() {
     Map gameInfo = {};
     Map gameInfo = {};
     for (var item in gameList) {
     for (var item in gameList) {
-      print(item['id']);
       if (item['id'].toString() == game_id.toString()) {
       if (item['id'].toString() == game_id.toString()) {
         gameInfo = item;
         gameInfo = item;
       }
       }
@@ -186,10 +175,7 @@ class RoomListState extends State<RoomList> {
                 flex: 1,
                 flex: 1,
                 child: Text(
                 child: Text(
                   gameInfo['gameName'],
                   gameInfo['gameName'],
-                  style: TextStyle(
-                      color: game_id != '' ? PRIMARY_COLOR : Colors.white,
-                      fontSize: 12,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(color: game_id != '' ? PRIMARY_COLOR : Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
                   overflow: TextOverflow.ellipsis,
                   overflow: TextOverflow.ellipsis,
                   textAlign: TextAlign.center,
                   textAlign: TextAlign.center,
                 ),
                 ),
@@ -222,10 +208,8 @@ class RoomListState extends State<RoomList> {
 
 
 //选择等级
 //选择等级
   Widget _chooseLevel() {
   Widget _chooseLevel() {
-    print(levelList);
     Map levelInfo = {};
     Map levelInfo = {};
     for (var item in levelList) {
     for (var item in levelList) {
-      print(item['id']);
       if (item['id'].toString() == house_level.toString()) {
       if (item['id'].toString() == house_level.toString()) {
         levelInfo = item;
         levelInfo = item;
       }
       }
@@ -243,10 +227,7 @@ class RoomListState extends State<RoomList> {
                 flex: 1,
                 flex: 1,
                 child: Text(
                 child: Text(
                   levelInfo['levelName'],
                   levelInfo['levelName'],
-                  style: TextStyle(
-                      color: house_level != '' ? PRIMARY_COLOR : Colors.white,
-                      fontSize: 12,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(color: house_level != '' ? PRIMARY_COLOR : Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
                   overflow: TextOverflow.ellipsis,
                   overflow: TextOverflow.ellipsis,
                   textAlign: TextAlign.center,
                   textAlign: TextAlign.center,
                 ),
                 ),
@@ -298,10 +279,7 @@ class RoomListState extends State<RoomList> {
                 flex: 1,
                 flex: 1,
                 child: Text(
                 child: Text(
                   typeInfo['name'],
                   typeInfo['name'],
-                  style: TextStyle(
-                      color: house_type != '' ? PRIMARY_COLOR : Colors.white,
-                      fontSize: 12,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(color: house_type != '' ? PRIMARY_COLOR : Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
                   overflow: TextOverflow.ellipsis,
                   overflow: TextOverflow.ellipsis,
                   textAlign: TextAlign.center,
                   textAlign: TextAlign.center,
                 ),
                 ),
@@ -353,10 +331,7 @@ class RoomListState extends State<RoomList> {
                 flex: 1,
                 flex: 1,
                 child: Text(
                 child: Text(
                   statusInfo['name'],
                   statusInfo['name'],
-                  style: TextStyle(
-                      color: status_flag != '' ? PRIMARY_COLOR : Colors.white,
-                      fontSize: 12,
-                      fontWeight: FontWeight.w500),
+                  style: TextStyle(color: status_flag != '' ? PRIMARY_COLOR : Colors.white, fontSize: 12, fontWeight: FontWeight.w500),
                   overflow: TextOverflow.ellipsis,
                   overflow: TextOverflow.ellipsis,
                   textAlign: TextAlign.center,
                   textAlign: TextAlign.center,
                 ),
                 ),
@@ -410,14 +385,13 @@ class RoomListState extends State<RoomList> {
     }
     }
     if (status_flag != '') {
     if (status_flag != '') {
       data['advancedQuery'] += 'AND_,status_flag_,=_,' + status_flag + '_;';
       data['advancedQuery'] += 'AND_,status_flag_,=_,' + status_flag + '_;';
-    }
-    else{
-      data['statusStr'] ='0,4';
+    } else {
+      data['statusStr'] = '0,4';
     }
     }
     Result res = await HttpManager.get("houseInfo/page", data: data);
     Result res = await HttpManager.get("houseInfo/page", data: data);
-    if (res.success&&res.data['pp']!=null) {
+    if (res.success && res.data['pp'] != null) {
       setState(() {
       setState(() {
-       roomList.addAll(res.data['pp']); 
+        roomList.addAll(res.data['pp']);
       });
       });
       if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
       if (res.data['page']['currentPage'] < res.data['page']['totalPage']) {
         scrollFlag = true;
         scrollFlag = true;

+ 1 - 5
lib/pages/setting.dart

@@ -177,16 +177,13 @@ class SettingState extends State<Setting> {
   }
   }
 
 
   void updateUserInfo(userInfo, value, key) async {
   void updateUserInfo(userInfo, value, key) async {
-    print(userInfo);
-    print(value);
-    print(key);
     if (Toast.preToast == null) {
     if (Toast.preToast == null) {
       Toast.show(context, '加载中', -1, 'loading');
       Toast.show(context, '加载中', -1, 'loading');
     }
     }
     final Result res = await HttpManager.post('userInfo/update', data: {"id": userInfo.id, key: value});
     final Result res = await HttpManager.post('userInfo/update', data: {"id": userInfo.id, key: value});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
-      Toast.show(context, '修改成���', 1500, 'success');
+      Toast.show(context, '修改成', 1500, 'success');
       getUserInfo();
       getUserInfo();
     } else {
     } else {
       Toast.show(context, res.error, 1500, 'info');
       Toast.show(context, res.error, 1500, 'info');
@@ -309,7 +306,6 @@ class SettingState extends State<Setting> {
       },
       },
     );
     );
     if (res != null) {
     if (res != null) {
-      print(res);
       updateUserInfo(userInfo, res.millisecondsSinceEpoch, 'birthday');
       updateUserInfo(userInfo, res.millisecondsSinceEpoch, 'birthday');
     }
     }
   }
   }

+ 1 - 1
lib/widget/HomeDrawer.dart

@@ -27,7 +27,7 @@ class HomeDrawerState extends State<HomeDrawer> {
   @override
   @override
   void initState() {
   void initState() {
     super.initState();
     super.initState();
-    Future.delayed(Duration(milliseconds: 100), () => getUserInfo);
+    Future.delayed(Duration.zero, () => getUserInfo());
   }
   }
 
 
   @override
   @override