李志伟 3 years ago
parent
commit
155685868b
3 changed files with 77 additions and 4 deletions
  1. BIN
      images/icons/cancel.png
  2. 76
    4
      lib/pages/userInfo/index.dart
  3. 1
    0
      pubspec.yaml

BIN
images/icons/cancel.png View File


+ 76
- 4
lib/pages/userInfo/index.dart View File

11
 }
11
 }
12
 
12
 
13
 class _UserInfo extends State<UserInfo> {
13
 class _UserInfo extends State<UserInfo> {
14
+  String name = '';
14
   @override
15
   @override
15
   Widget build(BuildContext context) {
16
   Widget build(BuildContext context) {
16
     return Scaffold(
17
     return Scaffold(
28
         ),
29
         ),
29
       ),
30
       ),
30
       body: Container(
31
       body: Container(
32
+        color: Color(0xFFffffff),
31
         padding: EdgeInsets.all(15.w),
33
         padding: EdgeInsets.all(15.w),
32
         child: Column(
34
         child: Column(
35
+          crossAxisAlignment: CrossAxisAlignment.start,
33
           children: [
36
           children: [
34
             Container(
37
             Container(
35
-              height: 92.h,
38
+              margin: EdgeInsets.fromLTRB(0, 0, 0, 40.h),
39
+              padding: EdgeInsets.symmetric(vertical: 15.h, horizontal: 0),
36
               decoration: BoxDecoration(
40
               decoration: BoxDecoration(
37
                 color: const Color(0xFFFFFFFF),
41
                 color: const Color(0xFFFFFFFF),
38
                 boxShadow: [
42
                 boxShadow: [
43
                   ),
47
                   ),
44
                 ],
48
                 ],
45
               ),
49
               ),
46
-              child: Row(children: [
47
-                Text('666'),
48
-              ]),
50
+              child: Row(
51
+                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
52
+                  children: [
53
+                    Image.asset(
54
+                      'images/userMoren.png',
55
+                      width: 62.w,
56
+                      height: 62.w,
57
+                    ),
58
+                    Text(
59
+                      '更换头像',
60
+                      style: TextStyle(
61
+                          fontSize: 17.sp,
62
+                          color: Color(0xFF333333),
63
+                          letterSpacing: 2,
64
+                          fontWeight: FontWeight.w500),
65
+                    ),
66
+                  ]),
49
             ),
67
             ),
68
+            Text(
69
+              '姓名:',
70
+              style: TextStyle(
71
+                  color: const Color(0xFF333333),
72
+                  fontSize: 17.sp,
73
+                  letterSpacing: 2,
74
+                  fontWeight: FontWeight.bold),
75
+            ),
76
+            Container(
77
+                margin: EdgeInsets.fromLTRB(0, 20.h, 0, 40.h),
78
+                padding: EdgeInsets.symmetric(vertical: 19.h, horizontal: 0),
79
+                decoration: BoxDecoration(
80
+                  color: const Color(0xFFFFFFFF),
81
+                  boxShadow: [
82
+                    BoxShadow(
83
+                      color: const Color(0x1F000000),
84
+                      offset: Offset(0, 1.w),
85
+                      blurRadius: 0,
86
+                    ),
87
+                  ],
88
+                ),
89
+                child: Column(
90
+                  children: [
91
+                    Row(
92
+                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
93
+                        children: [
94
+                          Container(
95
+                            width: 200.w,
96
+                            child: TextFormField(
97
+                              initialValue: name,
98
+                              style: TextStyle(
99
+                                  color: Color(0xFF333333),
100
+                                  fontSize: 17.sp,
101
+                                  letterSpacing: 2,
102
+                                  fontWeight: FontWeight.bold),
103
+                              decoration: const InputDecoration(
104
+                                isCollapsed: true,
105
+                                hintText: '请输入您的姓名',
106
+                                border: InputBorder.none,
107
+                                counterText: '', //去掉计数
108
+                                floatingLabelBehavior:
109
+                                    FloatingLabelBehavior.never,
110
+                              ),
111
+                              onChanged: (e) {},
112
+                            ),
113
+                          ),
114
+                          Image.asset(
115
+                            'images/icons/cancel.png',
116
+                            width: 18.w,
117
+                            height: 18.w,
118
+                          )
119
+                        ]),
120
+                  ],
121
+                )),
50
           ],
122
           ],
51
         ),
123
         ),
52
       ),
124
       ),

+ 1
- 0
pubspec.yaml View File

97
     - images/icons/decorate.png
97
     - images/icons/decorate.png
98
     - images/icons/edit.png
98
     - images/icons/edit.png
99
     - images/icons/delete.png
99
     - images/icons/delete.png
100
+    - images/icons/cancel.png
100
     - images/ordersListImga.png
101
     - images/ordersListImga.png
101
 
102
 
102
   # An image asset can refer to one or more resolution-specific "variants", see
103
   # An image asset can refer to one or more resolution-specific "variants", see