我的头像默认资源更新

This commit is contained in:
czz
2025-11-18 14:57:42 +08:00
parent 67e7df9f96
commit 3e3e38f43b
3 changed files with 17 additions and 8 deletions

9
assets/img/avatar.svg Normal file
View File

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80">
<title>资源 377</title>
<g>
<rect width="80" height="80" rx="40" style="fill:#8d8f94"/>
<rect width="80" height="80" style="fill:none"/>
<path d="M47.82,40.51A14.77,14.77,0,0,1,40,42.77a17.54,17.54,0,0,1-7.82-2A16.22,16.22,0,0,0,22,55.5c0,6.79,36.1,6.79,36.1-.28A16.2,16.2,0,0,0,47.82,40.51Zm2.46-12.06A10.28,10.28,0,1,1,40,18.17,10.28,10.28,0,0,1,50.28,28.45Z"
style="fill:#a7a9ae"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 484 B

View File

@@ -57,4 +57,6 @@ class ServiceConstant {
static const String app_system_push_message =
"/api/user/push/info"; //系统消息推送
static const String bgUrl =
"https://vsbst-api.he-info.cn/vsbs_sotrage/background-image/taihe.png";
}

View File

@@ -143,24 +143,22 @@ class _MinePageState extends State<MinePage> {
decoration: BoxDecoration(
shape: BoxShape.circle,
),
child: login == 1
child: login == 1
? (userInfoController.model.user!
.avatar ==
null ||
userInfoController.model
.user!.avatar!.isEmpty
? Image.asset(
"assets/img/avatar.jpg",
fit: BoxFit.cover,
? SvgPicture.asset(
"assets/img/avatar.svg",
)
: Image.network(
userInfoController
.model.user!.avatar!,
fit: BoxFit.cover,
))
: Image.asset(
"assets/img/avatar.jpg",
fit: BoxFit.cover,
: SvgPicture.asset(
"assets/img/avatar.svg",
),
// child: login == 1
// ? (userInfoController.model.user!