x1ongzhu 6 лет назад
Родитель
Сommit
1066e255e5
4 измененных файлов с 90 добавлено и 230 удалено
  1. 1 1
      android/app/build.gradle
  2. 38 62
      lib/pages/HomePage.dart
  3. 13 41
      lib/pages/RecordList.dart
  4. 38 126
      lib/pages/roomInfo.dart

+ 1 - 1
android/app/build.gradle

@@ -39,7 +39,7 @@ android {
         versionName flutterVersionName
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         ndk {
-            // abiFilters 'armeabi-v7a'
+            abiFilters 'armeabi-v7a'
         }
         manifestPlaceholders = [
             JPUSH_PKGNAME : applicationId,

+ 38 - 62
lib/pages/HomePage.dart

@@ -14,14 +14,13 @@ import '../net/Result.dart';
 import 'TipList.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import '../redux/AppState.dart';
-import '../model/UserInfo.dart';
 
-class HomePage extends StatefulWidget with WidgetsBindingObserver {
+class HomePage extends StatefulWidget {
   @override
   _HomePageState createState() => _HomePageState();
 }
 
-class _HomePageState extends State<HomePage> {
+class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
   List<CompetitionSeason> seasonList = [];
   int nowIndex = 0;
   PageController _pageController;
@@ -70,28 +69,21 @@ class _HomePageState extends State<HomePage> {
 
   void getOneRoom() async {
     Toast.show(context, '加载中', -1, 'loading');
-    Result res =
-        await HttpManager.get("houseInfo/getOne", data: {'statusFlag': 0});
+    Result res = await HttpManager.get("houseInfo/getOne", data: {'statusFlag': 0});
     Toast.hide();
     if (res.success) {
       if (res.data != null) {
-        Navigator.push(
-            context,
-            new CupertinoPageRoute(
-                builder: (context) =>
-                    new RoomInfo(roomId: res.data['id'].toString())));
+        Navigator.push(context, new CupertinoPageRoute(builder: (context) => new RoomInfo(roomId: res.data['id'].toString())));
       } else {
         showBackDialog();
       }
     }
   }
 
-  void getShowBadge() async {
-    Result res = await HttpManager.get("systemNotice/unread", data: {
-      'userId': StoreProvider.of<AppState>(context).state.userInfo.id
-    });
-    if (res.success&&res.data!=null) {
-      if (res.data>0) {
+  void getUnreadMsg() async {
+    Result res = await HttpManager.get("systemNotice/unread", data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'statusFlag': 0});
+    if (res.success && res.data != null) {
+      if (res.data > 0) {
         setState(() {
           showBadge = true;
         });
@@ -106,13 +98,27 @@ class _HomePageState extends State<HomePage> {
   @override
   void initState() {
     super.initState();
+    WidgetsBinding.instance.addObserver(this);
     _pageController = PageController(initialPage: 0);
     Future.delayed(Duration.zero, () {
       getSeasonInfo();
-      getShowBadge();
+      getUnreadMsg();
     });
   }
 
+  @override
+  void dispose() {
+    WidgetsBinding.instance.removeObserver(this);
+    super.dispose();
+  }
+
+  @override
+  void didChangeAppLifecycleState(AppLifecycleState state) {
+    if (state == AppLifecycleState.resumed) {
+      getUnreadMsg();
+    }
+  }
+
   @override
   Widget build(BuildContext context) {
     return Scaffold(
@@ -121,10 +127,8 @@ class _HomePageState extends State<HomePage> {
         width: double.infinity,
         height: double.infinity,
         decoration: BoxDecoration(
-            gradient: LinearGradient(colors: [
-          Color.fromARGB(255, 177, 59, 56),
-          Color.fromARGB(255, 147, 64, 61)
-        ], begin: Alignment.topCenter, end: Alignment.bottomCenter)),
+            gradient: LinearGradient(
+                colors: [Color.fromARGB(255, 177, 59, 56), Color.fromARGB(255, 147, 64, 61)], begin: Alignment.topCenter, end: Alignment.bottomCenter)),
         child: SafeArea(
           child: centerWidget(context),
         ),
@@ -146,11 +150,7 @@ class _HomePageState extends State<HomePage> {
                           scrollDirection: Axis.horizontal,
                           loop: true,
                           onTap: (index) {
-                            Navigator.push(
-                                context,
-                                new CupertinoPageRoute(
-                                    builder: (context) => new RankList(
-                                        raceId: seasonList[index].id)));
+                            Navigator.push(context, new CupertinoPageRoute(builder: (context) => new RankList(raceId: seasonList[index].id)));
                           },
                           onIndexChanged: (index) {
                             setState(() {
@@ -167,15 +167,12 @@ class _HomePageState extends State<HomePage> {
                                       Image.asset("images/home_icon_yuan.png"),
                                       Center(
                                         child: Row(
-                                          mainAxisAlignment:
-                                              MainAxisAlignment.center,
-                                          crossAxisAlignment:
-                                              CrossAxisAlignment.baseline,
+                                          mainAxisAlignment: MainAxisAlignment.center,
+                                          crossAxisAlignment: CrossAxisAlignment.baseline,
                                           textBaseline: TextBaseline.alphabetic,
                                           children: <Widget>[
                                             Text(
-                                              (seasonList[index].bonus / 1000)
-                                                  .toStringAsFixed(1),
+                                              (seasonList[index].bonus / 1000).toStringAsFixed(1),
                                               style: TextStyle(
                                                 color: Colors.white,
                                                 fontSize: 68,
@@ -247,10 +244,7 @@ class _HomePageState extends State<HomePage> {
                   color: Colors.transparent,
                   child: InkWell(
                     onTap: () {
-                      Navigator.push(
-                          context,
-                          new CupertinoPageRoute(
-                              builder: (context) => new Setting()));
+                      Navigator.push(context, new CupertinoPageRoute(builder: (context) => new Setting()));
                     },
                     child: Padding(
                       padding: EdgeInsets.all(12),
@@ -272,9 +266,7 @@ class _HomePageState extends State<HomePage> {
                       style: TextStyle(color: Colors.white, fontSize: 14),
                     ),
                     Text(
-                      seasonList.length > 0
-                          ? seasonList[nowIndex].gameInfo.gameName
-                          : '',
+                      seasonList.length > 0 ? seasonList[nowIndex].gameInfo.gameName : '',
                       style: TextStyle(color: Colors.white, fontSize: 14),
                     )
                   ],
@@ -296,13 +288,9 @@ class _HomePageState extends State<HomePage> {
                   Navigator.of(context).push(PageRouteBuilder(
                       opaque: false,
                       transitionDuration: Duration(milliseconds: 300),
-                      transitionsBuilder: (BuildContext context,
-                          Animation<double> animation,
-                          Animation<double> secondaryAnimation,
-                          Widget child) {
+                      transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
                         return FadeTransition(
-                          opacity: CurvedAnimation(
-                              parent: animation, curve: Curves.linear),
+                          opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
                           child: child,
                         );
                       },
@@ -322,20 +310,14 @@ class _HomePageState extends State<HomePage> {
                 "images/home_icon_sousuo.png",
                 "搜索",
                 onTapHomeMenu: () {
-                  Navigator.push(
-                      context,
-                      new CupertinoPageRoute(
-                          builder: (context) => new RoomList()));
+                  Navigator.push(context, new CupertinoPageRoute(builder: (context) => new RoomList()));
                 },
               ),
               HomeMenu(
                 "images/home_icon_youjian.png",
                 "邮件",
                 onTapHomeMenu: () {
-                  Navigator.push(
-                      context,
-                      new CupertinoPageRoute(
-                          builder: (context) => new TipList()));
+                  Navigator.push(context, new CupertinoPageRoute(builder: (context) => new TipList()));
                 },
                 showBadge: showBadge,
               ),
@@ -358,11 +340,8 @@ class HomeMenu extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Container(
-      decoration: BoxDecoration(
-          gradient: LinearGradient(
-              begin: Alignment.topCenter,
-              end: Alignment.bottomCenter,
-              colors: [Color(0xFF626C85), Color(0xFF3D3E6C)])),
+      decoration:
+          BoxDecoration(gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0xFF626C85), Color(0xFF3D3E6C)])),
       child: AspectRatio(
         aspectRatio: 1,
         child: Container(
@@ -395,10 +374,7 @@ class HomeMenu extends StatelessWidget {
                           child: Container(
                             width: showBadge ? 10 : 0,
                             height: showBadge ? 10 : 0,
-                            decoration: BoxDecoration(
-                                color: Color.fromARGB(255, 239, 0, 9),
-                                borderRadius:
-                                    BorderRadius.all(Radius.circular(10))),
+                            decoration: BoxDecoration(color: Color.fromARGB(255, 239, 0, 9), borderRadius: BorderRadius.all(Radius.circular(10))),
                           ),
                         )
                       ],

+ 13 - 41
lib/pages/RecordList.dart

@@ -28,11 +28,8 @@ class RecordListState extends State<RecordList> {
   void getListPage() async {
     isMore = false;
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("playerInfo/page", data: {
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id,
-      "currentPage": currentPage,
-      "pageNumber": 20
-    });
+    Result res = await HttpManager.get("playerInfo/page",
+        data: {"userId": StoreProvider.of<AppState>(context).state.userInfo.id, "currentPage": currentPage, "pageNumber": 20});
     Toast.hide();
     List<PlayerInfo> list = playerList;
     if (currentPage == 1) {
@@ -103,35 +100,25 @@ class RecordListState extends State<RecordList> {
                     if (playerList.length == 0) {
                       return Text(
                         '还没有战绩快去比赛吧...',
-                        style: TextStyle(
-                            color: Colors.white30, fontSize: 13, height: 2),
+                        style: TextStyle(color: Colors.white30, fontSize: 13, height: 2),
                         textAlign: TextAlign.center,
                       );
                     }
-                    return houseItem(
-                        roomInfo: playerList[index].houseInfo,
-                        gameInfo: playerList[index].gameInfo,
-                        playerInfo: playerList[index]);
+                    return houseItem(roomInfo: playerList[index].houseInfo, gameInfo: playerList[index].gameInfo, playerInfo: playerList[index]);
                   })),
         ));
   }
 }
 
 class houseItem extends StatelessWidget {
-  houseItem({Key key, this.roomInfo, this.gameInfo, this.playerInfo})
-      : super(key: key);
+  houseItem({Key key, this.roomInfo, this.gameInfo, this.playerInfo}) : super(key: key);
   final HouseInfo roomInfo;
   final GameInfo gameInfo;
   final PlayerInfo playerInfo;
 
   @override
   Widget build(BuildContext context) {
-    List imageList = [
-      'images/zhanji_icon_01.png',
-      'images/zhanji_icon_02.png',
-      'images/zhanji_icon_03.png',
-      'images/zhanji_icon_04.png'
-    ];
+    List imageList = ['images/zhanji_icon_01.png', 'images/zhanji_icon_02.png', 'images/zhanji_icon_03.png', 'images/zhanji_icon_04.png'];
     String imageSrc = '';
     if (playerInfo.houseRank != null) {
       if (playerInfo.houseRank < 4) {
@@ -144,7 +131,7 @@ class houseItem extends StatelessWidget {
     if (playerInfo.statusFlag != null) {
       if (playerInfo.statusFlag == 6) {
         tishiStr = '未参加';
-      } else if (playerInfo.statusFlag < 4||(roomInfo.statusFlag>=2&&roomInfo.statusFlag<4)) {
+      } else if (playerInfo.statusFlag < 4 || (roomInfo.statusFlag >= 2 && roomInfo.statusFlag < 4)) {
         tishiStr = '结算中';
       } else if (playerInfo.statusFlag < 2) {
         tishiStr = '准备中';
@@ -187,53 +174,38 @@ class houseItem extends StatelessWidget {
                             maxWidth: 170,
                             child: Text(
                               roomInfo.houseName,
-                              style: TextStyle(
-                                  color: Colors.white,
-                                  fontSize: 14,
-                                  fontWeight: FontWeight.w500),
+                              style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
                               maxLines: 1,
                               overflow: TextOverflow.ellipsis,
                             ),
                           ),
                           Container(
                             margin: EdgeInsets.only(left: 6),
-                            child: Image.network(roomInfo.houseLevel.icon,
-                                width: 14),
+                            child: Image.network(roomInfo.houseLevel.icon, width: 14),
                           ),
                           Container(
                               margin: EdgeInsets.only(left: 1),
                               child: Text(
                                 roomInfo.houseLevel.levelName,
-                                style: TextStyle(
-                                    color: Color(0xFFF9D881), fontSize: 9),
+                                style: TextStyle(color: Color(0xFFF9D881), fontSize: 9),
                               )),
                         ],
                       ),
                       Text(
                         roomInfo.houseAbstract,
-                        style: TextStyle(
-                            fontSize: 12,
-                            fontWeight: FontWeight.w400,
-                            color: Color(0xFF9BA0AE)),
+                        style: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Color(0xFF9BA0AE)),
                         maxLines: 2,
                         overflow: TextOverflow.ellipsis,
                       )
                     ],
                   ),
                 ),
-                imageSrc != ''
-                    ? Image.asset(imageSrc, width: 70)
-                    : Text(tishiStr,
-                        style: TextStyle(color: Colors.black38, fontSize: 14))
+                imageSrc != '' ? Image.asset(imageSrc, width: 70) : Text(tishiStr, style: TextStyle(color: Colors.black38, fontSize: 14))
               ],
             ),
           ),
           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())));
           },
         ),
       ),

+ 38 - 126
lib/pages/roomInfo.dart

@@ -22,8 +22,7 @@ class RoomInfo extends StatefulWidget {
   RoomInfoState createState() => RoomInfoState();
 }
 
-class RoomInfoState extends State<RoomInfo>
-    with SingleTickerProviderStateMixin {
+class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin {
   List<Map> tabList;
   TabController mController;
   Map roomInfo;
@@ -37,8 +36,7 @@ class RoomInfoState extends State<RoomInfo>
 //获取房间信息
   void getRoomInfo() async {
     Toast.show(context, '加载中', -1, 'loading');
-    Result res =
-        await HttpManager.get("houseInfo/getOne", data: {"id": widget.roomId});
+    Result res = await HttpManager.get("houseInfo/getOne", data: {"id": widget.roomId});
     Toast.hide();
     if (res.success) {
       if (isPop) {
@@ -57,8 +55,7 @@ class RoomInfoState extends State<RoomInfo>
 //隔一秒检查是否开始
   getNowStatus() async {
     await Future.delayed(const Duration(seconds: 1));
-    Result res = await HttpManager.get("houseInfo/getPlayerNum",
-        data: {"id": widget.roomId});
+    Result res = await HttpManager.get("houseInfo/getPlayerNum", data: {"id": widget.roomId});
     if (res.success) {
       if (houseInfo.statusFlag == 0 && res.data["statusFlag"] == 2) {
         showStart();
@@ -86,8 +83,7 @@ class RoomInfoState extends State<RoomInfo>
       PageRouteBuilder(
         opaque: false,
         transitionDuration: Duration(milliseconds: 300),
-        transitionsBuilder: (BuildContext context, Animation<double> animation,
-            Animation<double> secondaryAnimation, Widget child) {
+        transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) {
           return FadeTransition(
             opacity: CurvedAnimation(parent: animation, curve: Curves.linear),
             child: child,
@@ -101,11 +97,7 @@ class RoomInfoState extends State<RoomInfo>
     Map<String, dynamic> data = {"id": playerInfo.id};
     bool success = true;
     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) {
         data['statusFlag'] = 2;
@@ -125,8 +117,7 @@ class RoomInfoState extends State<RoomInfo>
         getTotast(10);
       } else {
         // showBackDialog();
-        Future.delayed(
-            Duration(milliseconds: 100), () => showBackDialog(success ? 1 : 0));
+        Future.delayed(Duration(milliseconds: 100), () => showBackDialog(success ? 1 : 0));
       }
     }
   }
@@ -164,8 +155,7 @@ class RoomInfoState extends State<RoomInfo>
                 child: new Text('完成比赛'),
                 onPressed: () async {
                   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();
                   print('stop stream screen:' + success.toString());
                   Toast.hide();
@@ -211,8 +201,7 @@ class RoomInfoState extends State<RoomInfo>
           content: Container(
             height: 50,
             child: Text(
-              (type == 1 ? '您未在十秒内点击开始按钮' : '您未允许录屏') +
-                  ',系统已经判定您放弃比赛,参赛奖金不予退还。',
+              (type == 1 ? '您未在十秒内点击开始按钮' : '您未允许录屏') + ',系统已经判定您放弃比赛,参赛奖金不予退还。',
               style: TextStyle(color: Colors.black),
             ),
           ),
@@ -234,10 +223,7 @@ class RoomInfoState extends State<RoomInfo>
 
 //检查加入信息
   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) {
       print(res.data);
       if (res.data == null) {
@@ -269,10 +255,7 @@ class RoomInfoState extends State<RoomInfo>
 //加入房间
   joinRoom() async {
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.post("houseInfo/join", data: {
-      "houseId": widget.roomId,
-      "userId": StoreProvider.of<AppState>(context).state.userInfo.id
-    });
+    Result res = await HttpManager.post("houseInfo/join", data: {"houseId": widget.roomId, "userId": StoreProvider.of<AppState>(context).state.userInfo.id});
     Toast.hide();
     if (res.success) {
       Toast.show(context, '加入成功', 1500, 'success');
@@ -367,10 +350,7 @@ class RoomInfoState extends State<RoomInfo>
             color: BG_SUB_COLOR,
             child: TabBarView(
               controller: mController,
-              children: [
-                _firstPage(),
-                SecondPage(roomId: widget.roomId, status: status)
-              ],
+              children: [_firstPage(), SecondPage(roomId: widget.roomId, status: status)],
             )),
         floatingActionButton: _joinBtn(),
         floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
@@ -384,6 +364,7 @@ class RoomInfoState extends State<RoomInfo>
         } else {
           Toast.show(context, '比赛即将开始,暂不能离开房间', 1500, 'info');
         }
+        return Future.value(false);
       },
     );
   }
@@ -391,17 +372,11 @@ class RoomInfoState extends State<RoomInfo>
   Widget _firstPage() {
     Map houseLevelInfo = roomInfo.isNotEmpty ? roomInfo["houseLevelInfo"] : {};
 
-    String levelName = houseLevelInfo.containsKey("levelName")
-        ? houseLevelInfo["levelName"]
-        : '黄金';
+    String levelName = houseLevelInfo.containsKey("levelName") ? houseLevelInfo["levelName"] : '黄金';
 
-    int joinMoney =
-        houseLevelInfo.containsKey('feeRatio') && roomInfo.containsKey("bonus")
-            ? houseLevelInfo["feeRatio"] * roomInfo["bonus"]
-            : 0;
+    int joinMoney = houseLevelInfo.containsKey('feeRatio') && roomInfo.containsKey("bonus") ? houseLevelInfo["feeRatio"] * roomInfo["bonus"] : 0;
 
-    String topImg =
-        'http://images.liqucn.com/img/h22/h70/img_localize_8e824debdd9ee29522690f36680e2d8e_600x337.png';
+    String topImg = 'http://images.liqucn.com/img/h22/h70/img_localize_8e824debdd9ee29522690f36680e2d8e_600x337.png';
     int statuFlag = 0;
     if (houseInfo != null) {
       if (houseInfo.video != null) {
@@ -425,9 +400,7 @@ class RoomInfoState extends State<RoomInfo>
             child: Container(
               child: Column(
                 children: <Widget>[
-                  houseInfo != null
-                      ? VideoWidget(videoSrc: houseInfo.video)
-                      : Container(),
+                  houseInfo != null ? VideoWidget(videoSrc: houseInfo.video) : Container(),
                   // Image.network(topImg, width: double.infinity),
                   Container(
                       padding: EdgeInsets.only(top: 10),
@@ -437,25 +410,16 @@ class RoomInfoState extends State<RoomInfo>
                           Container(
                             margin: EdgeInsets.only(left: 30, right: 8),
                             child: Text(
-                              roomInfo.containsKey("houseName")
-                                  ? roomInfo["houseName"]
-                                  : '',
-                              style: TextStyle(
-                                  color: Colors.white,
-                                  fontSize: 16,
-                                  fontWeight: FontWeight.w500),
+                              roomInfo.containsKey("houseName") ? roomInfo["houseName"] : '',
+                              style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                             ),
                           ),
                           Image.network(
-                            houseLevelInfo.containsKey("icon")
-                                ? houseLevelInfo["icon"]
-                                : '',
+                            houseLevelInfo.containsKey("icon") ? houseLevelInfo["icon"] : '',
                             width: 14,
                           ),
                           Text(
-                            houseLevelInfo.containsKey("levelName")
-                                ? houseLevelInfo["levelName"]
-                                : '',
+                            houseLevelInfo.containsKey("levelName") ? houseLevelInfo["levelName"] : '',
                             style: TextStyle(color: colorInfo[levelName]),
                           )
                         ],
@@ -463,9 +427,7 @@ class RoomInfoState extends State<RoomInfo>
                   Container(
                     margin: EdgeInsets.only(top: 6),
                     child: Text(
-                      roomInfo.containsKey('houseAbstract')
-                          ? roomInfo["houseAbstract"]
-                          : "",
+                      roomInfo.containsKey('houseAbstract') ? roomInfo["houseAbstract"] : "",
                       style: TextStyle(color: Color(0xFF9BA0AE), fontSize: 12),
                     ),
                   ),
@@ -477,17 +439,8 @@ class RoomInfoState extends State<RoomInfo>
                         width: 20,
                       ),
                       Text(
-                        (houseInfo != null
-                                ? houseInfo.playerNumber.toString()
-                                : '0') +
-                            '/' +
-                            (houseInfo != null
-                                ? houseInfo.maxNumber.toString()
-                                : '0'),
-                        style: TextStyle(
-                            fontSize: 14,
-                            fontWeight: FontWeight.w500,
-                            color: Color(0xFFB1B2C0)),
+                        (houseInfo != null ? houseInfo.playerNumber.toString() : '0') + '/' + (houseInfo != null ? houseInfo.maxNumber.toString() : '0'),
+                        style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Color(0xFFB1B2C0)),
                       )
                     ],
                   ),
@@ -496,10 +449,7 @@ class RoomInfoState extends State<RoomInfo>
                     width: 200,
                     height: 40,
                     decoration: BoxDecoration(
-                      border: Border.all(
-                          width: 1,
-                          color: PRIMARY_COLOR,
-                          style: BorderStyle.solid),
+                      border: Border.all(width: 1, color: PRIMARY_COLOR, style: BorderStyle.solid),
                       borderRadius: BorderRadius.all(Radius.circular(2)),
                     ),
                     child: Row(
@@ -521,10 +471,7 @@ class RoomInfoState extends State<RoomInfo>
                           ),
                         ),
                         Text(
-                          'X' +
-                              (houseInfo != null
-                                  ? houseInfo.bonus.toString()
-                                  : '0'),
+                          'X' + (houseInfo != null ? houseInfo.bonus.toString() : '0'),
                           style: TextStyle(
                             color: PRIMARY_COLOR,
                             fontSize: 22,
@@ -538,14 +485,10 @@ class RoomInfoState extends State<RoomInfo>
                       ? Container(
                           width: double.infinity,
                           margin: EdgeInsets.only(top: 25, left: 15, right: 15),
-                          padding: EdgeInsets.only(
-                              top: 15, left: 15, right: 10, bottom: 15),
+                          padding: EdgeInsets.only(top: 15, left: 15, right: 10, bottom: 15),
                           decoration: BoxDecoration(
                               borderRadius: BorderRadius.only(
-                                  topLeft: Radius.circular(0),
-                                  topRight: Radius.circular(8),
-                                  bottomLeft: Radius.circular(8),
-                                  bottomRight: Radius.circular(8)),
+                                  topLeft: Radius.circular(0), topRight: Radius.circular(8), bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8)),
                               gradient: LinearGradient(
                                 begin: Alignment.topRight,
                                 colors: [Color(0xFF464B6A), Color(0xFF35395E)],
@@ -582,11 +525,7 @@ class RoomInfoState extends State<RoomInfo>
       return Container(
         width: ScreenUtil().setWidth(375),
         height: 48 + ScreenUtil().setHeight(40),
-        padding: EdgeInsets.only(
-            top: ScreenUtil().setHeight(20),
-            bottom: ScreenUtil().setHeight(20),
-            left: 15,
-            right: 15),
+        padding: EdgeInsets.only(top: ScreenUtil().setHeight(20), bottom: ScreenUtil().setHeight(20), left: 15, right: 15),
         child: RaisedButton(
             textColor: Colors.white,
             child: Row(
@@ -600,20 +539,14 @@ class RoomInfoState extends State<RoomInfo>
                   margin: EdgeInsets.only(left: 6),
                   child: Text(
                     'X' + joinMoney.toString(),
-                    style: TextStyle(
-                        color: Colors.white,
-                        fontSize: 16,
-                        fontWeight: FontWeight.w500),
+                    style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                   ),
                 ),
                 Container(
                     margin: EdgeInsets.only(left: 20),
                     child: Text(
                       '加入房间',
-                      style: TextStyle(
-                          color: Colors.white,
-                          fontSize: 16,
-                          fontWeight: FontWeight.w500),
+                      style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w500),
                     ))
               ],
             ),
@@ -711,8 +644,7 @@ class RankContentState extends State<RankContent> {
   List<PlayerInfo> topList = [];
   getTopList() async {
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("playerInfo/rankPage",
-        data: {"houseId": widget.roomId, "currentPage": 1, "pageNumber": 3});
+    Result res = await HttpManager.get("playerInfo/rankPage", data: {"houseId": widget.roomId, "currentPage": 1, "pageNumber": 3});
     Toast.hide();
     List<PlayerInfo> list = [];
     if (res.success) {
@@ -781,19 +713,14 @@ class RankContentState extends State<RankContent> {
                   width: _num == 1 ? 70 : 60,
                   height: _num == 1 ? 70 : 60,
                   decoration: BoxDecoration(
-                    gradient: LinearGradient(
-                        colors: colorList[_num - 1],
-                        begin: Alignment.topLeft,
-                        end: Alignment.bottomRight),
+                    gradient: LinearGradient(colors: colorList[_num - 1], begin: Alignment.topLeft, end: Alignment.bottomRight),
                     borderRadius: BorderRadius.all(Radius.circular(100)),
                   ),
                   child: Center(
                       child: Container(
                     width: _num == 1 ? 60 : 50,
                     height: _num == 1 ? 60 : 50,
-                    child: CircleAvatar(
-                        backgroundImage:
-                            NetworkImage(topList[_num - 1].userInfo.icon)),
+                    child: CircleAvatar(backgroundImage: NetworkImage(topList[_num - 1].userInfo.icon)),
                   )),
                 ),
                 Positioned(
@@ -824,12 +751,7 @@ class RankContentState extends State<RankContent> {
             mainAxisAlignment: MainAxisAlignment.center,
             children: <Widget>[
               Image.asset('images/icon_jinbi_xiao_hong.png', width: 20),
-              Text(
-                  'x' +
-                      (topList[_num - 1].bonus != null
-                          ? topList[_num - 1].bonus.toString()
-                          : '0'),
-                  style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
+              Text('x' + (topList[_num - 1].bonus != null ? topList[_num - 1].bonus.toString() : '0'), style: TextStyle(color: PRIMARY_COLOR, fontSize: 12))
             ],
           )
         ],
@@ -856,11 +778,7 @@ class SecondPageState extends State<SecondPage> {
   getPlayerPage() async {
     ismore = false;
     Toast.show(context, '加载中', -1, 'loading');
-    Result res = await HttpManager.get("playerInfo/rankPage", data: {
-      "houseId": widget.roomId,
-      "currentPage": currentPage,
-      "pageNumber": 20
-    });
+    Result res = await HttpManager.get("playerInfo/rankPage", data: {"houseId": widget.roomId, "currentPage": currentPage, "pageNumber": 20});
     Toast.hide();
     List<PlayerInfo> list = joinList;
     if (currentPage == 1) {
@@ -890,8 +808,7 @@ class SecondPageState extends State<SecondPage> {
     Future.delayed(Duration.zero, () {
       getPlayerPage();
       _perController.addListener(() {
-        if (_perController.position.pixels ==
-            _perController.position.maxScrollExtent) {
+        if (_perController.position.pixels == _perController.position.maxScrollExtent) {
           if (ismore) {
             currentPage++;
             getPlayerPage();
@@ -947,10 +864,7 @@ class SecondPageState extends State<SecondPage> {
       margin: EdgeInsets.only(top: index == 0 ? 10 : 0),
       padding: EdgeInsets.only(left: 15, right: 15),
       child: Container(
-        decoration: BoxDecoration(
-            border: Border(
-                bottom: BorderSide(
-                    width: 1, color: BG_SUB_COLOR, style: BorderStyle.solid))),
+        decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 1, color: BG_SUB_COLOR, style: BorderStyle.solid))),
         child: Row(
           children: <Widget>[
             Container(
@@ -977,9 +891,7 @@ class SecondPageState extends State<SecondPage> {
             ),
             widget.status == 4 && index < 3
                 ? Image.asset(
-                    'images/icon_paihangbang_0' +
-                        (index + 1).toString() +
-                        '.png',
+                    'images/icon_paihangbang_0' + (index + 1).toString() + '.png',
                     width: 32,
                   )
                 : Container()