Skip to content

Commit ff76f3e

Browse files
committed
user phone show
1 parent fd11526 commit ff76f3e

File tree

1 file changed

+70
-51
lines changed

1 file changed

+70
-51
lines changed

lib/mine/settings_screen.dart

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -23,59 +23,61 @@ class _SettingsScreenState extends State<SettingsScreen> {
2323
builder: (context, state) {
2424
SystemUtil.changeStateBarMode(
2525
AppTheme.appTheme.isDark() ? Brightness.light : Brightness.dark);
26-
return Container(
27-
color: AppTheme.appTheme.containerBackgroundColor(),
28-
child: Stack(
29-
children: [
30-
ListView(physics: ClampingScrollPhysics(), children: [
31-
Container(
32-
margin: EdgeInsets.only(
33-
top: MediaQuery.of(context).padding.top, right: 24),
34-
alignment: Alignment.topRight,
35-
child: ClipRRect(
36-
borderRadius: BorderRadius.all(Radius.circular(16)),
37-
child: Image.network(
38-
'https://c-ssl.duitang.com/uploads/item/201903/06/20190306091021_kzhxr.jpg',
39-
width: 130,
40-
height: 130,
41-
fit: BoxFit.cover,
26+
return Scaffold(
27+
body: Container(
28+
color: AppTheme.appTheme.containerBackgroundColor(),
29+
child: Stack(
30+
children: [
31+
ListView(physics: ClampingScrollPhysics(), children: [
32+
Container(
33+
margin: EdgeInsets.only(
34+
top: MediaQuery.of(context).padding.top, right: 24),
35+
alignment: Alignment.topRight,
36+
child: ClipRRect(
37+
borderRadius: BorderRadius.all(Radius.circular(16)),
38+
child: Image.network(
39+
'https://c-ssl.duitang.com/uploads/item/201903/06/20190306091021_kzhxr.jpg',
40+
width: 130,
41+
height: 130,
42+
fit: BoxFit.cover,
43+
),
4244
),
4345
),
44-
),
45-
ChangeUserInfoView(),
46-
SizedBox(
47-
height: 100,
48-
)
49-
]),
50-
GestureDetector(
51-
onTap: () {
52-
Navigator.of(context).pop();
53-
},
54-
child: Container(
55-
alignment: Alignment.centerLeft,
56-
margin: EdgeInsets.only(
57-
top: MediaQuery.of(context).padding.top + 26),
58-
height: 45,
46+
ChangeUserInfoView(),
47+
SizedBox(
48+
height: 100,
49+
)
50+
]),
51+
GestureDetector(
52+
onTap: () {
53+
Navigator.of(context).pop();
54+
},
5955
child: Container(
60-
alignment: Alignment.center,
61-
width: 90,
62-
decoration: BoxDecoration(
63-
shape: BoxShape.rectangle,
64-
borderRadius: BorderRadius.only(
65-
topRight: Radius.circular(26),
66-
bottomRight: Radius.circular(26)),
67-
color: AppTheme.appTheme.cardBackgroundColor(),
68-
boxShadow: AppTheme.appTheme.containerBoxShadow()),
69-
child: SvgPicture.asset(
70-
'assets/images/fanhui.svg',
71-
width: 25,
72-
height: 25,
73-
color: AppTheme.appTheme.normalColor().withOpacity(0.8),
56+
alignment: Alignment.centerLeft,
57+
margin: EdgeInsets.only(
58+
top: MediaQuery.of(context).padding.top + 26),
59+
height: 45,
60+
child: Container(
61+
alignment: Alignment.center,
62+
width: 90,
63+
decoration: BoxDecoration(
64+
shape: BoxShape.rectangle,
65+
borderRadius: BorderRadius.only(
66+
topRight: Radius.circular(26),
67+
bottomRight: Radius.circular(26)),
68+
color: AppTheme.appTheme.cardBackgroundColor(),
69+
boxShadow: AppTheme.appTheme.containerBoxShadow()),
70+
child: SvgPicture.asset(
71+
'assets/images/fanhui.svg',
72+
width: 25,
73+
height: 25,
74+
color: AppTheme.appTheme.normalColor().withOpacity(0.8),
75+
),
7476
),
7577
),
76-
),
77-
)
78-
],
78+
)
79+
],
80+
),
7981
),
8082
);
8183
},
@@ -103,7 +105,7 @@ class _ChangeUserInfoViewState extends State<ChangeUserInfoView> {
103105
Widget build(BuildContext context) {
104106
return Container(
105107
margin: EdgeInsets.only(top: 32, left: 22, right: 22),
106-
padding: EdgeInsets.only(top: 16, bottom: 16),
108+
padding: EdgeInsets.only(top: 16, bottom: 24),
107109
decoration: BoxDecoration(
108110
shape: BoxShape.rectangle,
109111
borderRadius: BorderRadius.all(Radius.circular(15)),
@@ -118,9 +120,9 @@ class _ChangeUserInfoViewState extends State<ChangeUserInfoView> {
118120
initValue: userName,
119121
hintText: '名字',
120122
hintTextStyle: AppTheme.appTheme
121-
.hint(fontWeight: FontWeight.normal, fontSize: 16),
123+
.hint(fontWeight: FontWeight.bold, fontSize: 18),
122124
textStyle: AppTheme.appTheme
123-
.headline1(fontWeight: FontWeight.normal, fontSize: 16),
125+
.headline1(fontWeight: FontWeight.bold, fontSize: 18),
124126
containerDecoration: BoxDecoration(
125127
shape: BoxShape.rectangle,
126128
borderRadius: BorderRadius.all(Radius.circular(15)),
@@ -150,6 +152,23 @@ class _ChangeUserInfoViewState extends State<ChangeUserInfoView> {
150152
print(e);
151153
}
152154
},
155+
),
156+
Container(
157+
padding: EdgeInsets.only(left: 16),
158+
alignment: Alignment.centerLeft,
159+
margin: EdgeInsets.only(left: 32, right: 32, top: 16),
160+
decoration: BoxDecoration(
161+
shape: BoxShape.rectangle,
162+
borderRadius: BorderRadius.all(Radius.circular(15)),
163+
color: AppTheme.appTheme.containerBackgroundColor()),
164+
height: 65,
165+
child: Text(
166+
SessionUtils.sharedInstance().currentUser.phone,
167+
style: AppTheme.appTheme.numHeadline1(
168+
fontWeight: FontWeight.bold,
169+
fontSize: 23,
170+
textColor: AppTheme.appTheme.normalColor().withOpacity(0.5)),
171+
),
153172
)
154173
],
155174
),

0 commit comments

Comments
 (0)