Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
feb8d22d
提交
feb8d22d
authored
1月 18, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改头像后 回到我的界面请求我的信息
上级
f5087672
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
88 行增加
和
79 行删除
+88
-79
view.dart
lib/pages/mine/view.dart
+5
-2
view.dart
lib/pages/user_info/view.dart
+83
-77
没有找到文件。
lib/pages/mine/view.dart
浏览文件 @
feb8d22d
...
...
@@ -67,8 +67,11 @@ class _MinePageState extends State<MinePage> {
child:
SingleChildScrollView
(
child:
Column
(
children:
[
BuildUser
(
userInfo:
controller
.
userInfo
,
onTap:
(){
context
.
pushNamed
(
Routes
.
userInfo
,
extra:
controller
.
userInfo
);
BuildUser
(
userInfo:
controller
.
userInfo
,
onTap:
()
async
{
final
result
=
await
context
.
pushNamed
(
Routes
.
userInfo
,
extra:
controller
.
userInfo
);
if
(
result
==
true
){
controller
.
getInfo
();
}
},),
Gaps
.
vGaps10
,
BuildRead
(
items:
controller
.
reads
,
onTap:
(
ReadModel
model
)
async
{
...
...
lib/pages/user_info/view.dart
浏览文件 @
feb8d22d
...
...
@@ -14,90 +14,96 @@ class UserInfoPage extends StatefulWidget {
class
_UserInfoPageState
extends
State
<
UserInfoPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
GetBuilder
<
UserInfoController
>(
init:
UserInfoController
(
widget
.
userInfo
),
builder:
(
controller
)
=>
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'个人信息'
),
centerTitle:
true
,
),
body:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
AppTheme
.
margin
,
vertical:
AppTheme
.
margin
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
const
Offset
(
3
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
return
WillPopScope
(
onWillPop:
()
async
{
context
.
pop
(
true
);
return
false
;
},
child:
GetBuilder
<
UserInfoController
>(
init:
UserInfoController
(
widget
.
userInfo
),
builder:
(
controller
)
=>
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'个人信息'
),
centerTitle:
true
,
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
),
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
/// 头像
Container
(
height:
52
,
padding:
const
EdgeInsets
.
only
(
left:
18
,
right:
15
),
child:
GestureDetector
(
onTap:
()
async
{
final
assets
=
await
AssetsPicker
.
image
(
context:
context
,
source
:
ImageSource
.
gallery
,
maxWidth:
512
,
maxHeight:
512
,
);
controller
.
upload
(
path:
assets
!.
path
);
body:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
AppTheme
.
margin
,
vertical:
AppTheme
.
margin
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Colors
.
white
,
boxShadow:
[
BoxShadow
(
color:
const
Color
(
0xFFC7C7C7
).
withOpacity
(
0.5
),
offset:
const
Offset
(
3
,
0
),
blurRadius:
10
.
w
,
spreadRadius:
0
.
w
,
),
],
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
),
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
/// 头像
Container
(
height:
52
,
padding:
const
EdgeInsets
.
only
(
left:
18
,
right:
15
),
child:
GestureDetector
(
onTap:
()
async
{
final
assets
=
await
AssetsPicker
.
image
(
context:
context
,
source
:
ImageSource
.
gallery
,
maxWidth:
512
,
maxHeight:
512
,
);
controller
.
upload
(
path:
assets
!.
path
);
},
child:
Container
(
color:
Colors
.
transparent
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
const
Text
(
'头像'
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontSize:
14
,
height:
1.6
),),
Row
(
children:
[
Container
(
width:
33
.
w
,
height:
33
.
w
,
decoration:
const
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Colors
.
cyan
,
},
child:
Container
(
color:
Colors
.
transparent
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
const
Text
(
'头像'
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontSize:
14
,
height:
1.6
),),
Row
(
children:
[
Container
(
width:
33
.
w
,
height:
33
.
w
,
decoration:
const
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
Colors
.
cyan
,
),
child:
CustomImage
.
network
(
url:
controller
.
userInfo
.
headImg
??
''
,
radius:
16.5
,),
),
child:
CustomImage
.
network
(
url:
controller
.
userInfo
.
headImg
??
''
,
radius:
16.5
,),
),
Gaps
.
hGaps10
,
SizedBox
(
width:
5
,
height:
8
,
child:
Image
.
asset
(
'assets/images/right_arrow.png'
),
)
],
)
],
Gaps
.
hGaps10
,
SizedBox
(
width:
5
,
height:
8
,
child:
Image
.
asset
(
'assets/images/right_arrow.png'
),
)
],
)
],
),
),
),
),
),
Container
(
color:
Colours
.
cLine
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
15
),
height:
1
,),
GestureDetector
(
onTap:
(){
context
.
pushNamed
(
Routes
.
nike
);
},
child:
_buildItem
(
'昵称'
,
widget
.
userInfo
.
name
??
''
,
)
),
Container
(
color:
Colours
.
cLine
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
15
),
height:
1
,),
_buildItem
(
'性别'
,
widget
.
userInfo
.
sex
==
1
?
'男'
:
'女'
,)
,
]
,
Container
(
color:
Colours
.
cLine
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
15
),
height:
1
,
),
GestureDetector
(
onTap:
(){
context
.
pushNamed
(
Routes
.
nike
);
},
child:
_buildItem
(
'昵称'
,
widget
.
userInfo
.
name
??
''
,
)
),
Container
(
color:
Colours
.
cLine
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
15
),
height:
1
,
),
_buildItem
(
'性别'
,
widget
.
userInfo
.
sex
==
1
?
'男'
:
'女'
,),
]
,
)
,
),
)
,
)
)
)
,
),
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论