更新用户模块

This commit is contained in:
wyf
2025-06-09 19:11:25 +08:00
parent 8dfc522a69
commit 501d133bad
19 changed files with 1470 additions and 307 deletions

View File

@@ -7,6 +7,7 @@ import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
@@ -40,7 +41,7 @@ class _MinePageState extends State<NewMinePage> {
text = (nickname != null && nickname.isNotEmpty) ? nickname : '未命名'.tr;
}
// _calculateTextHalfWidth(text);
_calculateTextHalfWidth(text);
}
void _calculateTextHalfWidth(String text) {
@@ -60,6 +61,7 @@ class _MinePageState extends State<NewMinePage> {
_textHalfWidth = textPainter.width / 2;
});
}
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
@@ -185,6 +187,18 @@ class _MinePageState extends State<NewMinePage> {
highlightColor: const Color(0xFF055466),
padding: EdgeInsets.zero,
onTap: () async {
if (userInfoController.model.login ==
null ||
userInfoController.model.login == 0) {
TopSlideNotification.show(
context,
text: "必须登录提示".tr,
textColor:
themeController.currentColor.sc9,
);
Get.toNamed("/loginPage");
return;
}
await Get.toNamed("/editUserInfoPage");
await userInfoController.getUserInfo();
userInfoController.updateAll();
@@ -216,7 +230,6 @@ class _MinePageState extends State<NewMinePage> {
),
)),
),
],
),
),
@@ -385,13 +398,7 @@ class _MinePageState extends State<NewMinePage> {
child: SvgPicture.asset(
'assets/img/icon/expand.svg',
color: Colors.white,
)
// Icon(
// Icons.arrow_forward_ios,
// color: Colors.white,
// // size: 14.rpx,
// ),
)),
))),
],
),
),