panhui há 6 anos atrás
pai
commit
dc944c9531

+ 19 - 18
lib/pages/HomePage.dart

@@ -13,6 +13,7 @@ import '../net/Result.dart';
 import 'TipList.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import '../redux/AppState.dart';
+import 'setting.dart';
 
 class HomePage extends StatefulWidget {
   @override
@@ -242,24 +243,24 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
                   ),
                 ),
               ),
-              // Positioned(
-              //   right: 0,
-              //   top: 0,
-              //   width: 48,
-              //   height: 48,
-              //   child: Material(
-              //     color: Colors.transparent,
-              //     child: InkWell(
-              //       onTap: () {
-              //         Navigator.push(context, new CupertinoPageRoute(builder: (context) => new Setting()));
-              //       },
-              //       child: Padding(
-              //         padding: EdgeInsets.all(12),
-              //         child: Image.asset("images/home_icon_shezhi.png"),
-              //       ),
-              //     ),
-              //   ),
-              // ),
+              Positioned(
+                right: 0,
+                top: 0,
+                width: 48,
+                height: 48,
+                child: Material(
+                  color: Colors.transparent,
+                  child: InkWell(
+                    onTap: () {
+                      Navigator.push(context, new CupertinoPageRoute(builder: (context) => new Setting()));
+                    },
+                    child: Padding(
+                      padding: EdgeInsets.all(12),
+                      child: Image.asset("images/home_icon_shezhi.png"),
+                    ),
+                  ),
+                ),
+              ),
               Positioned(
                 bottom: 11,
                 left: 0,

+ 379 - 0
lib/pages/UserChange.dart

@@ -0,0 +1,379 @@
+import 'package:flutter/material.dart';
+import 'package:file_picker/file_picker.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:dio/dio.dart';
+import 'package:intl/intl.dart';
+import 'package:jpush_flutter/jpush_flutter.dart';
+import 'package:package_info/package_info.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import '../styles/colors.dart';
+import 'dart:io';
+import 'dart:async';
+import 'dart:convert';
+import 'dart:ui';
+import '../styles/totast.dart';
+import 'ChangeUserInfo.dart'; //修改信息页面
+import 'loginFirst.dart'; //登录
+import 'package:redux/redux.dart';
+import 'package:flutter_redux/flutter_redux.dart';
+import '../redux/AppState.dart';
+import '../model/UserInfo.dart';
+import '../net/HttpManager.dart';
+import '../net/Result.dart';
+import '../redux/UserRedux.dart';
+
+class UserChange extends StatefulWidget {
+  @override
+  UserChangeState createState() => UserChangeState();
+}
+
+class UserChangeState extends State<UserChange> {
+  String version = "";
+  bool receiveMsg = false;
+
+  void getFilePath() async {
+    String filePath = await FilePicker.getFilePath(type: FileType.IMAGE);
+    if (filePath == null) {
+      return;
+    }
+    File _file = File(filePath);
+    Toast.show(context, '加载中', -1, 'loading');
+    Result res = await HttpManager.post("assets/uploadFile", data: {
+      "file": UploadFileInfo(_file, filePath),
+    });
+    Toast.hide();
+    if (res.success) {
+      updateUserInfo(StoreProvider.of<AppState>(context).state.userInfo, res.data[0], 'icon');
+    } else {}
+  }
+
+  @override
+  void initState() {
+    super.initState();
+    PackageInfo.fromPlatform().then((packageInfo) {
+      setState(() {
+        version = packageInfo.version;
+      });
+    });
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    ScreenUtil.instance = ScreenUtil(width: 375, height: 667)..init(context);
+    return StoreConnector<AppState, UserInfo>(
+        converter: (Store store) => store.state.userInfo,
+        builder: (context, userInfo) {
+          return new WillPopScope(
+              key: Key("UserChangesPage"),
+              child: Scaffold(
+                backgroundColor: PAGE_BACKGROUND_COLOR,
+                appBar: AppBar(
+                  backgroundColor: PRIMARY_COLOR,
+                  title: Text('系统设置'),
+                  centerTitle: true,
+                  elevation: 0,
+                ),
+                body: Stack(
+                  children: <Widget>[
+                    RefreshIndicator(
+                      color: PRIMARY_COLOR,
+                      backgroundColor: Colors.white,
+                      displacement: 10,
+                      onRefresh: () async {
+                        await new Future.delayed(const Duration(seconds: 1));
+                        getUserInfo();
+                      },
+                      child: SizedBox.expand(
+                        child: SingleChildScrollView(
+                          physics: AlwaysScrollableScrollPhysics(),
+                          child: Column(
+                            children: <Widget>[
+                              _sectionDivier(),
+                              _section([
+                                _cell(
+                                    '头像',
+                                    ClipOval(
+                                      child: Image.network(userInfo.icon, width: 36, height: 36),
+                                    ), onTap: () {
+                                  getFilePath();
+                                }),
+                                _cell('昵称', userInfo.nickname, placeholder: '请填写昵称', onTap: () {
+                                  Navigator.push(
+                                      context, new CupertinoPageRoute(builder: (context) => new ChangeUserInfo(title: '昵称', val: userInfo.nickname)));
+                                }),
+                                _cell('性别', userInfo.sex, placeholder: '请添加性别信息', onTap: () {
+                                  _chooseSex(context);
+                                }),
+                                _cell(
+                                  '生日',
+                                  DateFormat('yyyy-MM-dd').format(
+                                    DateTime.fromMillisecondsSinceEpoch(userInfo.birthday),
+                                  ),
+                                  placeholder: '选择生日',
+                                  onTap: () {
+                                    _chooseBirthday(context);
+                                  },
+                                ),
+                                _cell('手机', userInfo.phone, showBorder: false, onTap: () {
+                                  Navigator.push(context, new CupertinoPageRoute(builder: (context) => new ChangeUserInfo(title: '手机号', val: userInfo.phone)));
+                                })
+                              ]),
+                             
+                            ],
+                          ),
+                        ),
+                      ),
+                    ),
+                    // Positioned(
+                    //   bottom: 10,
+                    //   right: 15,
+                    //   left: 15,
+                    //   height: 48,
+                    //   child: FlatButton(
+                    //       textColor: Colors.white,
+                    //       color: PRIMARY_COLOR,
+                    //       highlightColor: Color(0xFF763434),
+                    //       child: Text(
+                    //         "退出登录",
+                    //         style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700),
+                    //       ),
+                    //       onPressed: () async {
+                    //         Toast.show(context, '退出成功', 1500, 'success');
+                    //         Navigator.push(context, new MaterialPageRoute(builder: (context) => new LoginFirst()));
+                    //         final prefs = await SharedPreferences.getInstance();
+                    //         prefs.remove('token');
+                    //         JPush jpush = JPush();
+                    //         jpush.deleteAlias();
+                    //         // Future.delayed(const Duration(seconds: 1), () {
+                    //         //   StoreProvider.of<AppState>(context).dispatch(UpdateUserAction(null));
+                    //         // });
+                    //       }),
+                    // )
+                  ],
+                ),
+              ),
+              onWillPop: () {
+                Toast.hide();
+                Navigator.pop(context);
+                return Future.value(false);
+              });
+        });
+  }
+
+  void updateUserInfo(userInfo, value, key) async {
+    if (Toast.preToast == null) {
+      Toast.show(context, '加载中', -1, 'loading');
+    }
+    final Result res = await HttpManager.post('userInfo/update', data: {"id": userInfo.id, key: value});
+    Toast.hide();
+    if (res.success) {
+      Toast.show(context, '修改成功', 1500, 'success');
+      getUserInfo();
+    } else {
+      Toast.show(context, res.error, 1500, 'info');
+    }
+  }
+
+  void getUserInfo() async {
+    Result res = await HttpManager.get("userInfo/getUserInfo");
+    if (res.success) {
+      StoreProvider.of<AppState>(context).dispatch(UpdateUserAction(UserInfo.fromJson(res.data)));
+    } else {}
+  }
+
+  _chooseSex(BuildContext context) async {
+    String sex = await showCupertinoModalPopup(
+        context: context,
+        builder: (BuildContext context) {
+          return CupertinoActionSheet(
+            title: Text('选择性别'),
+            actions: <Widget>[
+              CupertinoActionSheetAction(
+                child: Text('男'),
+                onPressed: () {
+                  Navigator.pop(context, '男');
+                },
+              ),
+              CupertinoActionSheetAction(
+                child: Text('女'),
+                onPressed: () {
+                  Navigator.pop(context, '女');
+                },
+              ),
+              CupertinoDialogAction(
+                child: const Text('取消'),
+                isDestructiveAction: true,
+                onPressed: () {
+                  Navigator.pop(context);
+                },
+              )
+            ],
+          );
+        });
+    if (sex != null) {
+      updateUserInfo(StoreProvider.of<AppState>(context).state.userInfo, sex, 'sex');
+    }
+  }
+
+  _chooseBirthday(BuildContext context) async {
+    UserInfo userInfo = StoreProvider.of<AppState>(context).state.userInfo;
+    DateTime date = userInfo.birthday > 0 ? DateTime.fromMillisecondsSinceEpoch(userInfo.birthday) : DateTime.now();
+    DateTime res = await showCupertinoModalPopup<DateTime>(
+      context: context,
+      builder: (BuildContext context) {
+        return Container(
+          height: 216,
+          color: CupertinoColors.white,
+          child: Column(
+            children: <Widget>[
+              SizedBox(
+                height: 44,
+                child: Stack(
+                  children: <Widget>[
+                    Positioned(
+                      left: 0,
+                      top: 0,
+                      bottom: 0,
+                      child: CupertinoButton(
+                        child: Text(
+                          '取消',
+                          style: TextStyle(color: PRIMARY_COLOR),
+                        ),
+                        onPressed: () {
+                          Navigator.of(context).pop();
+                        },
+                      ),
+                    ),
+                    Positioned(
+                      right: 0,
+                      top: 0,
+                      bottom: 0,
+                      child: CupertinoButton(
+                        child: Text(
+                          '确定',
+                          style: TextStyle(color: PRIMARY_COLOR),
+                        ),
+                        onPressed: () {
+                          Navigator.of(context).pop(date);
+                        },
+                      ),
+                    )
+                  ],
+                ),
+              ),
+              Expanded(
+                flex: 1,
+                child: DefaultTextStyle(
+                  style: const TextStyle(
+                    color: CupertinoColors.black,
+                    fontSize: 22.0,
+                  ),
+                  child: GestureDetector(
+                    // Blocks taps from propagating to the modal sheet and popping.
+                    onTap: () {},
+                    child: SafeArea(
+                      top: false,
+                      child: CupertinoDatePicker(
+                        mode: CupertinoDatePickerMode.date,
+                        initialDateTime: date,
+                        onDateTimeChanged: (DateTime newDateTime) {
+                          date = newDateTime;
+                        },
+                      ),
+                    ),
+                  ),
+                ),
+              )
+            ],
+          ),
+        );
+      },
+    );
+    if (res != null) {
+      updateUserInfo(userInfo, res.millisecondsSinceEpoch, 'birthday');
+    }
+  }
+
+  _chooseImage(BuildContext context) async {
+    UserInfo userInfo = StoreProvider.of<AppState>(context).state.userInfo;
+    var image = await FilePicker.getFilePath(type: FileType.IMAGE);
+    Toast.show(context, '加载中', -1, 'loading');
+    File _image = File(image);
+    _image.readAsBytes().then((bytes) async {
+      String encoded1 = 'data:image/jpeg;base64,' + base64Encode(bytes);
+      FormData formData = new FormData.from({"base64": encoded1});
+      Result res = await HttpManager.post('assets/uploadImg', data: formData);
+      if (res.success) {
+        updateUserInfo(userInfo, res.data, 'icon');
+      }
+    });
+  }
+
+  Widget _sectionDivier() {
+    return SizedBox(height: 10);
+  }
+
+  Widget _section(List<Widget> children) {
+    return Container(
+      color: CELL_COLOR,
+      child: Column(
+        children: children,
+      ),
+    );
+  }
+
+  Widget _cell(String title, dynamic child, {String placeholder, void Function() onTap, bool showBorder = true}) {
+    Widget secondChild;
+    if (child == null || (child is String && child.length == 0)) {
+      secondChild = Text(
+        placeholder ?? '',
+        style: TextStyle(color: PLACEHOLDER_COLOR, fontSize: 13),
+      );
+    } else if (child is String) {
+      secondChild = Text(
+        child ?? '',
+        style: TextStyle(color: Colors.white, fontSize: 15),
+      );
+    } else {
+      secondChild = child;
+    }
+    return Container(
+      height: 60,
+      padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
+      child: GestureDetector(
+        onTap: onTap,
+        child: Container(
+          decoration: BoxDecoration(
+            border: Border(
+              bottom: BorderSide(
+                color: Color(0x2E000000),
+                width: showBorder ? 1 : 0,
+              ),
+            ),
+          ),
+          child: Row(
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: <Widget>[
+              Expanded(
+                child: Text(
+                  title ?? '',
+                  style: TextStyle(color: Colors.white, fontSize: 14),
+                ),
+              ),
+              secondChild,
+              Padding(
+                padding: EdgeInsets.only(left: 2),
+                child: Image.asset(
+                  "images/icon_inter.png",
+                  width: 24,
+                  height: 24,
+                ),
+              )
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 34 - 19
lib/pages/roomInfo.dart

@@ -162,13 +162,12 @@ class RoomInfoState extends State<RoomInfo>
         data: {"houseId": widget.roomId});
 
     if (res.success) {
-      print('结束比赛' + res.data.toString());
       int time = houseInfo.beginTime +
           1 * 3600 * 1000 -
           DateTime.now().millisecondsSinceEpoch;
       var nowTime = (time ~/ 1000 ~/ 60) % 60;
       setState(() {
-        roomTipsList.insert(0, [
+        roomTipsList.add( [
           '你已完成本次比赛,当前完成人数 ',
           res.data.toString(),
           '人,比赛需要等待所有人完成后方可结算奖励 最迟结算时间还剩',
@@ -176,7 +175,6 @@ class RoomInfoState extends State<RoomInfo>
           ',你可以先去参加其他竞赛,稍后在“个人中心-我的战绩”中可以查看本次竞赛排名及领取奖励'
         ]);
       });
-      print('111111' + roomTipsList.length.toString());
     }
   }
 
@@ -202,7 +200,7 @@ class RoomInfoState extends State<RoomInfo>
           isJoin = false;
         });
         if (houseInfo.statusFlag == 0) {
-          roomTipsList.insert(0, [
+          roomTipsList.add( [
             '上方奖金为当前本次竞赛的总奖金,根据当前人数的增加,奖金也就越多,竞赛的第一名获得50%,第二名获得30%,第三名获得20%,其他名次算作失败没有奖励,祝你取得好成绩'
           ]);
         }
@@ -221,16 +219,16 @@ class RoomInfoState extends State<RoomInfo>
                   .userInfo
                   .id
                   .toString()) {
-            roomTipsList.insert(0, [
+            roomTipsList.add( [
               '房间创建成功,待人数满员时会自动开启比赛,请在此页面耐心等待其他人的加入,退出房间则视为自动放弃比赛,已支付金币概不退换,快快点击右上角分享给好友加入战局吧'
             ]);
           } else {
-            roomTipsList.insert(0, [
+            roomTipsList.add( [
               '请在此页面耐心等待,竞赛即将开始,届时玩家有10秒的时间进行确认,点击确认方可正式进入竞赛,若没有点击,则视为自动放弃此次竞赛,已支付金币概不退换'
             ]);
           }
           Timer(Duration(seconds: 1), () {
-            roomTipsList.insert(0, [
+            roomTipsList.add([
               '游戏开始后会有弹窗提示授权进行录屏的操作,',
               '请一定点击“确定”或“允许”此操作',
               ',系统会自动跳转打开游戏app,若长时间没有自动跳转,请手动打开游戏app进行比赛,在游戏比赛结束后,请',
@@ -238,11 +236,10 @@ class RoomInfoState extends State<RoomInfo>
               ',返回游戏主页,最后再切换到我们竞赛app中,点击完成比赛,方可成功长传本次成绩,赢取大奖,感谢你的配合'
             ]);
           });
-
-         
-        }
-        else if(houseInfo.statusFlag!=4){
-          if (playerInfo.statusFlag == 3) {
+        } else if (houseInfo.statusFlag != 4) {
+          if (playerInfo.statusFlag == 3 ||
+              playerInfo.statusFlag == 8 ||
+              playerInfo.statusFlag == 9) {
             getEndTips();
           }
         }
@@ -259,11 +256,11 @@ class RoomInfoState extends State<RoomInfo>
     });
     Toast.hide();
     if (res.success) {
-      roomTipsList.insert(0, [
+      roomTipsList.add( [
         '请在此页面耐心等待,竞赛即将开始,届时玩家有10秒的时间进行确认,点击确认方可正式进入竞赛,若没有点击,则视为自动放弃此次竞赛,已支付金币概不退换'
       ]);
       Timer(Duration(seconds: 1), () {
-        roomTipsList.insert(0, [
+        roomTipsList.add( [
           '游戏开始后会有弹窗提示授权进行录屏的操作,',
           '请一定点击“确定”或“允许”此操作',
           ',系统会自动跳转打开游戏app,若长时间没有自动跳转,请手动打开游戏app进行比赛,在游戏比赛结束后,请',
@@ -586,7 +583,10 @@ class RoomInfoState extends State<RoomInfo>
         width: ScreenUtil().setWidth(375),
         height: 48 + ScreenUtil().setHeight(40),
         padding: EdgeInsets.only(
-            bottom: ScreenUtil().setHeight(20), left: 15, right: 15),
+            top: ScreenUtil().setHeight(20),
+            bottom: ScreenUtil().setHeight(20),
+            left: 15,
+            right: 15),
         child: RaisedButton(
             textColor: Colors.white,
             child: Row(
@@ -708,13 +708,27 @@ class TipsListContent extends StatefulWidget {
 }
 
 class TipsListContentState extends State<TipsListContent> {
+  ScrollController _scrollController;
+
   @override
-  void didUpdateWidget(TipsListContent oldWidget) {
-    // TODO: implement didChangeDependencies
-    super.didUpdateWidget(oldWidget);
-    print('updtae:' + widget.tipsList.length.toString());
+  void initState() {
+    // TODO: implement initState
+    super.initState();
+    _scrollController=new ScrollController();
   }
 
+  // @override
+  // void didUpdateWidget(TipsListContent oldWidget) {
+  //   // TODO: implement didChangeDependencies
+  //   super.didUpdateWidget(oldWidget);
+  //   print('updtae:' + widget.tipsList.length.toString());
+  //   _scrollController.animateTo(_scrollController.positions.length*1.0,
+  //           duration: new Duration(seconds: 2), curve: Curves.ease);
+
+  //   // _scrollController.position.pixels=_scrollController.position
+  //   // _scrollController.
+  // }
+
   @override
   Widget build(BuildContext context) {
     return Expanded(
@@ -723,6 +737,7 @@ class TipsListContentState extends State<TipsListContent> {
           margin: EdgeInsets.only(top: 15),
           width: double.infinity,
           child: SingleChildScrollView(
+            controller: _scrollController,
             child: Column(
               children: _list(),
             ),

+ 4 - 0
lib/pages/roomList.dart

@@ -193,6 +193,7 @@ class RoomListState extends State<RoomList> {
             setState(() {
               game_id = value;
             });
+            currentPage=1;
             getRoomInfo();
           },
           itemBuilder: (BuildContext context) {
@@ -245,6 +246,7 @@ class RoomListState extends State<RoomList> {
             setState(() {
               house_level = value;
             });
+            currentPage=1;
             getRoomInfo();
           },
           itemBuilder: (BuildContext context) {
@@ -297,6 +299,7 @@ class RoomListState extends State<RoomList> {
             setState(() {
               house_type = value;
             });
+            currentPage=1;
             getRoomInfo();
           },
           itemBuilder: (BuildContext context) {
@@ -349,6 +352,7 @@ class RoomListState extends State<RoomList> {
             setState(() {
               status_flag = value;
             });
+            currentPage=1;
             getRoomInfo();
           },
           itemBuilder: (BuildContext context) {

+ 1 - 31
lib/pages/setting.dart

@@ -89,37 +89,7 @@ class SettingState extends State<Setting> {
                           physics: AlwaysScrollableScrollPhysics(),
                           child: Column(
                             children: <Widget>[
-                              _sectionDivier(),
-                              _section([
-                                _cell(
-                                    '头像',
-                                    ClipOval(
-                                      child: Image.network(userInfo.icon, width: 36, height: 36),
-                                    ), onTap: () {
-                                  getFilePath();
-                                }),
-                                _cell('昵称', userInfo.nickname, placeholder: '请填写昵称', onTap: () {
-                                  Navigator.push(
-                                      context, new CupertinoPageRoute(builder: (context) => new ChangeUserInfo(title: '昵称', val: userInfo.nickname)));
-                                }),
-                                _cell('性别', userInfo.sex, placeholder: '请添加性别信息', onTap: () {
-                                  _chooseSex(context);
-                                }),
-                                _cell(
-                                  '生日',
-                                  DateFormat('yyyy-MM-dd').format(
-                                    DateTime.fromMillisecondsSinceEpoch(userInfo.birthday),
-                                  ),
-                                  placeholder: '选择生日',
-                                  onTap: () {
-                                    _chooseBirthday(context);
-                                  },
-                                ),
-                                _cell('手机', userInfo.phone, showBorder: false, onTap: () {
-                                  Navigator.push(context, new CupertinoPageRoute(builder: (context) => new ChangeUserInfo(title: '手机号', val: userInfo.phone)));
-                                })
-                              ]),
-                              _sectionDivier(),
+                             _sectionDivier(),
                               _section([
                                 _cell(
                                     '是否接收消息',

+ 46 - 18
lib/widget/HomeDrawer.dart

@@ -10,7 +10,7 @@ import '../pages/RecordList.dart';
 import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../redux/UserRedux.dart';
-import '../pages/setting.dart';
+import '../pages/UserChange.dart';
 
 class HomeDrawer extends StatefulWidget {
   @override
@@ -21,7 +21,8 @@ class HomeDrawerState extends State<HomeDrawer> {
   void getUserInfo() async {
     Result res = await HttpManager.get("userInfo/getUserInfo");
     if (res.success) {
-      StoreProvider.of<AppState>(context).dispatch(UpdateUserAction(UserInfo.fromJson(res.data)));
+      StoreProvider.of<AppState>(context)
+          .dispatch(UpdateUserAction(UserInfo.fromJson(res.data)));
     } else {}
   }
 
@@ -53,11 +54,19 @@ class HomeDrawerState extends State<HomeDrawer> {
                     mainAxisAlignment: MainAxisAlignment.center,
                     children: <Widget>[
                       ClipOval(
-                        child: Image.network(
-                          userInfo.icon,
-                          width: 86,
-                          height: 86,
-                          fit: BoxFit.cover,
+                        child: InkWell(
+                          child: Image.network(
+                            userInfo.icon,
+                            width: 86,
+                            height: 86,
+                            fit: BoxFit.cover,
+                          ),
+                          onTap: () {
+                            Navigator.push(
+                                context,
+                                new CupertinoPageRoute(
+                                    builder: (context) => new UserChange()));
+                          },
                         ),
                       ),
                       Container(
@@ -68,7 +77,10 @@ class HomeDrawerState extends State<HomeDrawer> {
                           children: <Widget>[
                             Text(
                               userInfo.nickname,
-                              style: TextStyle(fontSize: 27, color: Colors.white, fontWeight: FontWeight.w700),
+                              style: TextStyle(
+                                  fontSize: 27,
+                                  color: Colors.white,
+                                  fontWeight: FontWeight.w700),
                             ),
                             Row(
                               mainAxisAlignment: MainAxisAlignment.center,
@@ -78,12 +90,16 @@ class HomeDrawerState extends State<HomeDrawer> {
                                   child: SizedBox(
                                     width: 20,
                                     height: 20,
-                                    child: Image.asset("images/icon_jinbi_da_bai.png"),
+                                    child: Image.asset(
+                                        "images/icon_jinbi_da_bai.png"),
                                   ),
                                 ),
                                 Text(
                                   userInfo.moneyCoin.toString(),
-                                  style: TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.w700),
+                                  style: TextStyle(
+                                      fontSize: 16,
+                                      color: Colors.white,
+                                      fontWeight: FontWeight.w700),
                                 )
                               ],
                             ),
@@ -104,25 +120,34 @@ class HomeDrawerState extends State<HomeDrawer> {
                         "images/icon_qianbao.png",
                         "我的钱包",
                         onTap: () {
-                          Navigator.push(context, new CupertinoPageRoute(builder: (context) => new MyWallet()));
+                          Navigator.push(
+                              context,
+                              new CupertinoPageRoute(
+                                  builder: (context) => new MyWallet()));
                         },
                       ),
                       Divder(),
                       DrawerMenu("images/icon_zhanji.png", "我的战绩", onTap: () {
-                        Navigator.push(context, new CupertinoPageRoute(builder: (context) => new RecordList()));
+                        Navigator.push(
+                            context,
+                            new CupertinoPageRoute(
+                                builder: (context) => new RecordList()));
                       }),
                       Divder(),
                       DrawerMenu(
                         "images/icon_bangding.png",
                         "游戏绑定",
                         onTap: () {
-                          Navigator.push(context, new CupertinoPageRoute(builder: (context) => new BindGame()));
+                          Navigator.push(
+                              context,
+                              new CupertinoPageRoute(
+                                  builder: (context) => new BindGame()));
                         },
                       ),
-                      Divder(),
-                      DrawerMenu('images/home_icon_shezhi.png', '个人设置',onTap: (){
-                         Navigator.push(context, new CupertinoPageRoute(builder: (context) => new Setting()));
-                      },)
+                      // Divder(),
+                      // DrawerMenu('images/home_icon_shezhi.png', '个人设置',onTap: (){
+                      //    Navigator.push(context, new CupertinoPageRoute(builder: (context) => new Setting()));
+                      // },)
                     ],
                   ),
                 ),
@@ -171,7 +196,10 @@ class DrawerMenu extends StatelessWidget {
                 margin: EdgeInsets.only(left: 16),
                 child: Text(
                   title,
-                  style: TextStyle(color: Colors.white, fontSize: 15, fontWeight: FontWeight.w700),
+                  style: TextStyle(
+                      color: Colors.white,
+                      fontSize: 15,
+                      fontWeight: FontWeight.w700),
                 ),
               ),
             ),