更新消息小红点未读显示

This commit is contained in:
wyf
2025-12-10 16:59:29 +08:00
parent fb5a17830b
commit f2657e4238
5 changed files with 75 additions and 54 deletions

View File

@@ -319,24 +319,45 @@ class _HomePageState extends State<HomePage> {
mainAxisAlignment:
MainAxisAlignment.end,
children: [
Container(
constraints: BoxConstraints(
maxWidth:
bodySize.maxWidth *
0.6),
child: Text(
userInfoController.model.user!
.nick_name ??
'未命名'.tr,
style: TextStyle(
color: themeController
.currentColor.sc3,
fontSize: AppConstants()
.normal_text_fontSize,
ClickableContainer(
backgroundColor:
Colors.transparent,
highlightColor:
Colors.transparent,
padding: EdgeInsets.all(0),
onTap: () async {
int login = userInfoController
.model.login!;
if (login == 1) {
await Get.toNamed(
"/updateUserPage");
await userInfoController
.getUserInfo();
userInfoController
.updateAll();
} else {
Get.toNamed("/loginPage");
}
},
child: Container(
constraints: BoxConstraints(
maxWidth:
bodySize.maxWidth *
0.6),
child: Text(
userInfoController.model
.user!.nick_name ??
'未命名'.tr,
style: TextStyle(
color: themeController
.currentColor.sc3,
fontSize: AppConstants()
.normal_text_fontSize,
),
maxLines: 1,
overflow:
TextOverflow.ellipsis,
),
maxLines: 1,
overflow:
TextOverflow.ellipsis,
),
),
// Obx(() {