Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
d8d34c31
提交
d8d34c31
authored
2月 22, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1:我的页面和个人信息页面超长昵称显示问题
上级
448adb05
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
46 行增加
和
28 行删除
+46
-28
view.dart
lib/pages/mine/view.dart
+0
-1
user.dart
lib/pages/mine/widgets/user.dart
+41
-25
view.dart
lib/pages/user_info/view.dart
+5
-2
没有找到文件。
lib/pages/mine/view.dart
浏览文件 @
d8d34c31
...
...
@@ -44,7 +44,6 @@ class _MinePageState extends State<MinePage> {
GestureDetector
(
onTap:
()
async
{
final
result
=
await
context
.
pushNamed
(
Routes
.
msgs
);
print
(
'---------------------------------1111
$result
'
);
if
(
result
==
true
){
controller
.
getNums
();
...
...
lib/pages/mine/widgets/user.dart
浏览文件 @
d8d34c31
...
...
@@ -2,23 +2,18 @@ part of mine;
/// 用户信息
class
BuildUser
extends
StatelessWidget
{
final
void
Function
()?
onTap
;
final
UserInfoModel
userInfo
;
const
BuildUser
({
super
.
key
,
this
.
onTap
,
required
this
.
userInfo
});
const
BuildUser
({
super
.
key
,
this
.
onTap
,
required
this
.
userInfo
});
@override
Widget
build
(
BuildContext
context
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
onTap
,
onTap:
onTap
,
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
),
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
),
color:
Colors
.
transparent
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
...
...
@@ -33,7 +28,10 @@ class BuildUser extends StatelessWidget {
color:
Colors
.
cyan
,
),
// color: Colors.cyan,
child:
CustomImage
.
network
(
url:
userInfo
.
headImg
??
''
,
radius:
22.5
.
w
,),
child:
CustomImage
.
network
(
url:
userInfo
.
headImg
??
''
,
radius:
22.5
.
w
,
),
),
Gaps
.
hGaps10
,
Column
(
...
...
@@ -42,22 +40,34 @@ class BuildUser extends StatelessWidget {
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
userInfo
.
name
??
''
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontSize:
15
.
w
,
fontWeight:
Fonts
.
medium
,
height:
1.6
.
w
),),
ConstrainedBox
(
constraints:
BoxConstraints
(
maxWidth:
150
.
w
,
// 设置最大宽度
),
child:
Text
(
userInfo
.
name
??
''
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Colours
.
c3
,
fontSize:
15
.
w
,
fontWeight:
Fonts
.
medium
,
height:
1.6
.
w
),
),
),
Gaps
.
hGaps20
,
Stack
(
children:
[
Container
(
padding:
EdgeInsets
.
only
(
right:
8
.
w
,
left:
8
.
w
),
padding:
EdgeInsets
.
only
(
right:
8
.
w
,
left:
8
.
w
),
height:
20
.
w
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
21
.
w
),
gradient:
LinearGradient
(
colors:
[
AppTheme
.
primary
.
withOpacity
(
0.03
),
AppTheme
.
primary
.
withOpacity
(
0.1
)]
,
// 不可点击时的颜色,透明度为0.7
colors:
[
AppTheme
.
primary
.
withOpacity
(
0.03
),
AppTheme
.
primary
.
withOpacity
(
0.1
)
],
// 不可点击时的颜色,透明度为0.7
begin:
Alignment
.
centerLeft
,
end:
Alignment
.
centerRight
,
),
...
...
@@ -68,26 +78,32 @@ class BuildUser extends StatelessWidget {
width:
16
.
w
,
height:
17
.
w
,
),
Text
(
userInfo
.
gradeName
??
''
,
style:
TextStyle
(
fontSize:
11
.
w
,
color:
AppTheme
.
primary
),)
Text
(
userInfo
.
gradeName
??
''
,
style:
TextStyle
(
fontSize:
11
.
w
,
color:
AppTheme
.
primary
),
)
],
),
),
Positioned
(
left:
8
,
child:
SizedBox
(
width:
16
.
w
,
height:
17
.
w
,
child:
Image
.
asset
(
'assets/images/grade.png'
)
),
width:
16
.
w
,
height:
17
.
w
,
child:
Image
.
asset
(
'assets/images/grade.png'
)),
)
],
)
],
),
Gaps
.
vGaps5
,
Text
(
userInfo
.
phone
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
color:
Colours
.
c6
)
,)
Text
(
userInfo
.
phone
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
color:
Colours
.
c6
),
)
],
),
Gaps
.
hGaps20
,
...
...
lib/pages/user_info/view.dart
浏览文件 @
d8d34c31
...
...
@@ -287,15 +287,18 @@ class _UserInfoPageState extends State<UserInfoPage> {
color:
Colours
.
c3
,
),
),
SizedBox
(
width:
10
.
w
,),
Row
(
children:
[
Text
(
Container
(
width:
240
.
w
,
alignment:
Alignment
.
centerRight
,
child:
Text
(
value
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontSize:
14
.
w
,
color:
Colours
.
c9
,
),
),
),
),
Gaps
.
hGaps10
,
SizedBox
(
width:
5
.
w
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论