|
|
@@ -21,8 +21,7 @@ class HomeDrawerState extends State<HomeDrawer> {
|
|
|
Future<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 {}
|
|
|
}
|
|
|
|
|
|
@@ -62,10 +61,7 @@ class HomeDrawerState extends State<HomeDrawer> {
|
|
|
fit: BoxFit.cover,
|
|
|
),
|
|
|
onTap: () {
|
|
|
- Navigator.push(
|
|
|
- context,
|
|
|
- CupertinoPageRoute(
|
|
|
- builder: (context) => UserChange()));
|
|
|
+ Navigator.push(context, CupertinoPageRoute(builder: (context) => UserChange()));
|
|
|
},
|
|
|
),
|
|
|
),
|
|
|
@@ -77,10 +73,7 @@ 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,
|
|
|
@@ -90,16 +83,12 @@ 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),
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
@@ -120,28 +109,19 @@ class HomeDrawerState extends State<HomeDrawer> {
|
|
|
'images/icon_qianbao.png',
|
|
|
'我的钱包',
|
|
|
onTap: () {
|
|
|
- Navigator.push(
|
|
|
- context,
|
|
|
- CupertinoPageRoute(
|
|
|
- builder: (context) => MyWallet()));
|
|
|
+ Navigator.push(context, CupertinoPageRoute(builder: (context) => MyWallet()));
|
|
|
},
|
|
|
),
|
|
|
Divder(),
|
|
|
DrawerMenu('images/icon_zhanji.png', '我的战绩', onTap: () {
|
|
|
- Navigator.push(
|
|
|
- context,
|
|
|
- CupertinoPageRoute(
|
|
|
- builder: (context) => RecordList()));
|
|
|
+ Navigator.push(context, CupertinoPageRoute(builder: (context) => RecordList()));
|
|
|
}),
|
|
|
Divder(),
|
|
|
DrawerMenu(
|
|
|
'images/icon_bangding.png',
|
|
|
'游戏绑定',
|
|
|
onTap: () {
|
|
|
- Navigator.push(
|
|
|
- context,
|
|
|
- CupertinoPageRoute(
|
|
|
- builder: (context) => BindGame()));
|
|
|
+ Navigator.push(context, CupertinoPageRoute(builder: (context) => BindGame()));
|
|
|
},
|
|
|
),
|
|
|
// Divder(),
|
|
|
@@ -196,10 +176,7 @@ 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),
|
|
|
),
|
|
|
),
|
|
|
),
|