panhui 6 年之前
父节点
当前提交
0635987465

+ 1 - 1
lib/pages/BindGame.dart

@@ -81,7 +81,7 @@ class BindGameState extends State<BindGame> {
   Widget build(BuildContext context) {
     return Scaffold(
         appBar: AppBar(
-          backgroundColor: PRIMARY_COLOR,
+          // backgroundColor: PRIMARY_COLOR,
           title: Text('绑定账号'),
           centerTitle: true,
           elevation: 0,

+ 1 - 1
lib/pages/ChangeUserInfo.dart

@@ -46,7 +46,7 @@ class ChangeUserInfoState extends State<ChangeUserInfo> {
           return WillPopScope(
               child: Scaffold(
                   appBar: AppBar(
-                    backgroundColor: PRIMARY_COLOR,
+                    // backgroundColor: PRIMARY_COLOR,
                     title: Text('修改' + widget.title),
                     centerTitle: true,
                     elevation: 0,

+ 1 - 1
lib/pages/LoginSecond.dart

@@ -45,7 +45,7 @@ class LoginSecondState extends State<LoginSecond> {
           color: BG_SUB_COLOR,
           child: Scaffold(
               appBar: AppBar(
-                backgroundColor: BG_SUB_COLOR,
+                // backgroundColor: BG_SUB_COLOR,
                 centerTitle: true,
                 elevation: 0,
               ),

+ 1 - 1
lib/pages/Recharge.dart

@@ -68,7 +68,7 @@ class RechrageState extends State<Rechrage> {
     
     return Scaffold(
         appBar: AppBar(
-          backgroundColor: PRIMARY_COLOR,
+          // backgroundColor: PRIMARY_COLOR,
           title: Text('充值'),
           centerTitle: true,
           elevation: 0,

+ 1 - 1
lib/pages/RecordList.dart

@@ -37,7 +37,7 @@ class RecordListState extends State<RecordList> with SingleTickerProviderStateMi
   Widget build(BuildContext context) {
     return Scaffold(
         appBar: AppBar(
-          backgroundColor: PRIMARY_COLOR,
+          // backgroundColor: PRIMARY_COLOR,
           title: Padding(
             padding: EdgeInsets.only(right: 56),
             child: TabBar(

+ 76 - 75
lib/pages/Setting.dart

@@ -1,3 +1,4 @@
+import 'package:flutter/cupertino.dart' as prefix0;
 import 'package:flutter/material.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -17,6 +18,7 @@ import '../net/HttpManager.dart';
 import '../net/Result.dart';
 import '../redux/UserRedux.dart';
 import '../widget/Dialog.dart';
+import '../widget/LinearButton.dart';
 
 class Setting extends StatefulWidget {
   @override
@@ -46,86 +48,82 @@ class SettingState extends State<Setting> {
           return WillPopScope(
               key: Key('SettingsPage'),
               child: Scaffold(
-                backgroundColor: PAGE_BACKGROUND_COLOR,
+                backgroundColor: Color(0xFF2E3049),
                 appBar: AppBar(
-                  backgroundColor: PRIMARY_COLOR,
+                  // 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 Future.delayed(const Duration(seconds: 1));
-                        getUserInfo();
-                      },
-                      child: SizedBox.expand(
-                        child: SingleChildScrollView(
-                          physics: AlwaysScrollableScrollPhysics(),
-                          child: Column(
-                            children: <Widget>[
-                             _sectionDivier(),
-                              _section([
-                                _cell(
-                                    '是否接收消息',
-                                    Switch(
-                                        value: userInfo.noticeFlag,
-                                        onChanged: (val) {
-                                          updateUserInfo(userInfo, val ? 'Y' : 'N', 'noticeFlag');
-                                        }),
-                                    showBorder: false),
-                                    _cell(
-                                    '是否查看房间提醒',
-                                    Switch(
-                                        value: userInfo.remindFlag,
-                                        onChanged: (val) {
-                                          updateUserInfo(userInfo, val ? 'Y' : 'N', 'remindFlag');
-                                        }),
-                                    showBorder: false)
-                              ]),
-                              _sectionDivier(),
-                              _section([
-                                _cell('检查更新', ' ',onTap: (){
-                                  MyDialog.showDialog(context, '您已是最新版本。');
-                                }),
-                                _cell('版本号', version, showBorder: false),
-                              ]),
-                            ],
+                body: RefreshIndicator(
+                  color: PRIMARY_COLOR,
+                  backgroundColor: Colors.white,
+                  displacement: 10,
+                  onRefresh: () async {
+                    await Future.delayed(const Duration(seconds: 1));
+                    getUserInfo();
+                  },
+                  child: SizedBox.expand(
+                    child: SingleChildScrollView(
+                      physics: AlwaysScrollableScrollPhysics(),
+                      child: Column(
+                        children: <Widget>[
+                          _sectionDivier(),
+                          _section([
+                            _cell(
+                                '是否接收消息',
+                                Switch(
+                                    value: userInfo.noticeFlag,
+                                    onChanged: (val) {
+                                      updateUserInfo(userInfo, val ? 'Y' : 'N', 'noticeFlag');
+                                    }),
+                                showBorder: false),
+                            _cell(
+                                '是否查看房间提醒',
+                                Switch(
+                                    value: userInfo.remindFlag,
+                                    onChanged: (val) {
+                                      updateUserInfo(userInfo, val ? 'Y' : 'N', 'remindFlag');
+                                    }),
+                                showBorder: false)
+                          ]),
+                          _sectionDivier(),
+                          _section([
+                            _cell('检查更新', ' ', onTap: () {
+                              MyDialog.showDialog(context, '您已是最新版本。');
+                            }),
+                            _cell('版本号', version, showBorder: false),
+                          ]),
+                          Container(
+                            padding: EdgeInsets.fromLTRB(15, 60, 15, 30),
+                            child: LinearButton(
+                              btntext: '退出登录',
+                              onTapHomeMenu: () async {
+                                Toast.show(context, '退出成功', 1500, 'success');
+                                Navigator.push(context, MaterialPageRoute(builder: (context) => 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));
+                                // });
+                              },
+                            ),
                           ),
-                        ),
+                        ],
                       ),
                     ),
-                    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, MaterialPageRoute(builder: (context) => 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));
-                            // });
-                          }),
-                    )
-                  ],
+                  ),
+                ),
+                floatingActionButton: Container(
+                  height: 100,
+                  padding: EdgeInsets.symmetric(vertical: 30),
+                  child: Column(
+                    children: <Widget>[Text('Copyright©2019',style:TextStyle(color: Colors.white30,fontSize: 12)), Text('盛世明越(海南)科技有限公',style:TextStyle(color: Colors.white30,fontSize: 12))],
+                  ),
                 ),
+                floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
               ),
               onWillPop: () {
                 Toast.hide();
@@ -156,7 +154,7 @@ class SettingState extends State<Setting> {
     } else {}
   }
 
-    Future<void> _chooseSex(BuildContext context) async {
+  Future<void> _chooseSex(BuildContext context) async {
     String sex = await showCupertinoModalPopup(
         context: context,
         builder: (BuildContext context) {
@@ -270,12 +268,15 @@ class SettingState extends State<Setting> {
   }
 
   Widget _sectionDivier() {
-    return SizedBox(height: 10);
+    return Container(
+      height: 10,
+      color: Color(0xFF24263A),
+    );
   }
 
   Widget _section(List<Widget> children) {
     return Container(
-      color: CELL_COLOR,
+      color: Color(0xFF2E3049),
       child: Column(
         children: children,
       ),
@@ -306,7 +307,7 @@ class SettingState extends State<Setting> {
           decoration: BoxDecoration(
             border: Border(
               bottom: BorderSide(
-                color: Color(0x2E000000),
+                color: Color(0xFF24263A),
                 width: showBorder ? 1 : 0,
               ),
             ),

+ 1 - 1
lib/pages/TipInfo.dart

@@ -88,7 +88,7 @@ class TipInfoState extends State<TipInfo> {
     return WillPopScope(
       child: Scaffold(
           appBar: AppBar(
-            backgroundColor: PRIMARY_COLOR,
+            // backgroundColor: PRIMARY_COLOR,
             title: Text('通知详情'),
             centerTitle: true,
             elevation: 0,

+ 1 - 1
lib/pages/TipList.dart

@@ -73,7 +73,7 @@ class TipListState extends State<TipList> {
     return WillPopScope(
         child: Scaffold(
             appBar: AppBar(
-              backgroundColor: PRIMARY_COLOR,
+              // backgroundColor: PRIMARY_COLOR,
               title: Text('通知列表'),
               centerTitle: true,
               elevation: 0,

+ 1 - 1
lib/pages/UserChange.dart

@@ -50,7 +50,7 @@ class UserChangeState extends State<UserChange> {
               child: Scaffold(
                 backgroundColor: PAGE_BACKGROUND_COLOR,
                 appBar: AppBar(
-                  backgroundColor: PRIMARY_COLOR,
+                  // backgroundColor: PRIMARY_COLOR,
                   title: Text('系统设置'),
                   centerTitle: true,
                   elevation: 0,