756 lines
43 KiB
Dart
756 lines
43 KiB
Dart
import 'package:ef/ef.dart';
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter/services.dart';
|
||
import 'package:flutter_svg/svg.dart';
|
||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||
import 'package:vbvs_app/controller/date/CalendarController.dart';
|
||
import 'package:vbvs_app/controller/login/login_controller.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';
|
||
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||
import 'package:vbvs_app/enum/LoginStatus.dart';
|
||
|
||
class MinePage extends StatefulWidget {
|
||
const MinePage({super.key});
|
||
|
||
@override
|
||
State<MinePage> createState() => _MinePageState();
|
||
}
|
||
|
||
class _MinePageState extends State<MinePage> {
|
||
GlobalController globalController = Get.find();
|
||
UserInfoController userInfoController = Get.find();
|
||
ThemeController themeController = Get.find();
|
||
CalendarController calendarController = Get.find();
|
||
LoginController loginController = Get.find();
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||
statusBarColor: Colors.transparent, // 这里设置你希望的颜色
|
||
statusBarIconBrightness: Brightness.light, // 状态栏图标的亮度
|
||
));
|
||
int login = userInfoController.model.login!;
|
||
return LayoutBuilder(
|
||
builder: (context, bodySize) => GestureDetector(
|
||
// onTap: () => FocusScope.of(context).unfocus(),,
|
||
child: Container(
|
||
decoration: BoxDecoration(
|
||
image: DecorationImage(
|
||
image: AssetImage('assets/img/bgImage.png'), // 本地图片
|
||
fit: BoxFit.fill, // 填满整个 Container
|
||
),
|
||
),
|
||
child: Scaffold(
|
||
backgroundColor: Colors.transparent,
|
||
body: SafeArea(
|
||
top: true,
|
||
child: Container(
|
||
height: bodySize.maxHeight,
|
||
child: Column(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
Container(
|
||
width: double.infinity,
|
||
decoration: BoxDecoration(
|
||
color: Colors.transparent,
|
||
borderRadius: BorderRadius.only(
|
||
bottomLeft: Radius.circular(
|
||
AppConstants().normal_container_radius),
|
||
bottomRight: Radius.circular(
|
||
AppConstants().normal_container_radius),
|
||
topLeft: Radius.circular(0.rpx),
|
||
topRight: Radius.circular(0.rpx),
|
||
),
|
||
),
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
64.rpx, 0, 37.rpx, 0),
|
||
child: Column(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0, 65.rpx, 0, 0),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment: MainAxisAlignment.end,
|
||
children: [
|
||
ClickableContainer(
|
||
backgroundColor:
|
||
Colors.transparent, // 容器背景色
|
||
highlightColor: themeController
|
||
.currentColor.sc21, // 点击时的背景色
|
||
padding: EdgeInsets
|
||
.zero, // 这里去掉外部的 padding,避免影响点击范围
|
||
onTap: () {
|
||
if (userInfoController.model.login ==
|
||
LoginStatus.LOGIN.code) {
|
||
Get.toNamed("/settingPage");
|
||
} else {
|
||
TopSlideNotification.show(
|
||
context,
|
||
text: "必须登录提示".tr,
|
||
textColor:
|
||
themeController.currentColor.sc9,
|
||
);
|
||
Get.toNamed("/loginPage");
|
||
}
|
||
},
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
10.rpx, 10.rpx, 10.rpx, 10.rpx),
|
||
child: SvgPicture.asset(
|
||
'assets/img/icon/setting.svg',
|
||
width: 29.rpx,
|
||
height: 29
|
||
.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
|
||
color: themeController.currentColor.sc3,
|
||
),
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 60.rpx)),
|
||
),
|
||
),
|
||
Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0, 50.rpx, 0, 66.rpx),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment:
|
||
MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Obx(() {
|
||
var userInfo =
|
||
userInfoController.model.user;
|
||
return Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
Container(
|
||
width: 120.rpx,
|
||
height: 120.rpx,
|
||
clipBehavior: Clip.antiAlias,
|
||
decoration: BoxDecoration(
|
||
shape: BoxShape.circle,
|
||
),
|
||
child: login == 1
|
||
? (userInfoController.model.user!
|
||
.avatar ==
|
||
null ||
|
||
userInfoController.model
|
||
.user!.avatar!.isEmpty
|
||
? SvgPicture.asset(
|
||
"assets/img/avatar.svg",
|
||
)
|
||
: Image.network(
|
||
userInfoController
|
||
.model.user!.avatar!,
|
||
fit: BoxFit.cover,
|
||
))
|
||
: SvgPicture.asset(
|
||
"assets/img/avatar.svg",
|
||
),
|
||
// child: login == 1
|
||
// ? (userInfoController.model.user!
|
||
// .avatar ==
|
||
// null ||
|
||
// userInfoController.model
|
||
// .user!.avatar!.isEmpty
|
||
// ? Image.asset(
|
||
// "assets/img/avatar.jpg",
|
||
// fit: BoxFit.cover,
|
||
// )
|
||
// : Image.asset(
|
||
// "assets/img/avatar.jpg",
|
||
// fit: BoxFit.cover,
|
||
// ))
|
||
// : Image.asset(
|
||
// "assets/img/avatar.jpg",
|
||
// fit: BoxFit.cover,
|
||
// ),
|
||
),
|
||
Column(
|
||
mainAxisSize: MainAxisSize.max,
|
||
crossAxisAlignment:
|
||
CrossAxisAlignment.start,
|
||
children: [
|
||
Text(
|
||
limitText(
|
||
login == 1
|
||
? (userInfoController
|
||
.model
|
||
.user
|
||
?.nick_name ==
|
||
null ||
|
||
userInfoController
|
||
.model
|
||
.user
|
||
?.nick_name ==
|
||
""
|
||
? '未命名'.tr
|
||
: userInfoController
|
||
.model
|
||
.user
|
||
?.nick_name)
|
||
: '未命名'.tr,
|
||
AppConstants()
|
||
.text_length, // 这里设置最大长度,按你需求改,比如 6~10 字符
|
||
),
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
fontSize: AppConstants()
|
||
.title_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
Text(
|
||
login == 1
|
||
? (() {
|
||
final user =
|
||
userInfoController
|
||
.model.user!;
|
||
if (user.phone != null &&
|
||
user.phone!
|
||
.isNotEmpty) {
|
||
return MyUtils
|
||
.hidePhoneNumber(
|
||
user.phone!);
|
||
} else if (user.email !=
|
||
null &&
|
||
user.email!
|
||
.isNotEmpty) {
|
||
return user.email!;
|
||
} else {
|
||
return "微信用户".tr;
|
||
}
|
||
})()
|
||
: "未知数据".tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc4,
|
||
fontSize: AppConstants()
|
||
.normal_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
].divide(SizedBox(height: 20.rpx)),
|
||
),
|
||
].divide(SizedBox(width: 35.rpx)),
|
||
);
|
||
}),
|
||
CustomCard(
|
||
borderRadius: 0,
|
||
onTap: () async {
|
||
if (login == 1) {
|
||
await Get.toNamed("/updateUserPage");
|
||
await userInfoController.getUserInfo();
|
||
userInfoController.updateAll();
|
||
} else {
|
||
Get.toNamed("/loginPage");
|
||
}
|
||
},
|
||
// colors: [themeController.currentColor.sc5],
|
||
colors: [Colors.transparent],
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
Text(
|
||
login == 1 ? '编辑'.tr : '我的.去登录'.tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc2,
|
||
fontSize: AppConstants()
|
||
.normal_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
Padding(
|
||
padding:
|
||
EdgeInsetsDirectional.fromSTEB(
|
||
0, 6.rpx, 0, 0.rpx),
|
||
child: SvgPicture.asset(
|
||
'assets/img/icon/arrow_right.svg',
|
||
width: 14.rpx,
|
||
height:
|
||
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 16.rpx)),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
30.rpx, 25.rpx, 30.rpx, 0),
|
||
child: Container(
|
||
width: double.infinity,
|
||
decoration: BoxDecoration(
|
||
color: Color(0xFF242835),
|
||
borderRadius: BorderRadius.circular(
|
||
AppConstants().normal_container_radius),
|
||
),
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0.rpx, 0, 0.rpx, 0),
|
||
child: Column(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
ClickableContainer(
|
||
backgroundColor: Colors.transparent, // 容器背景色
|
||
highlightColor: themeController
|
||
.currentColor.sc21, // 点击时的背景色
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||
onTap: () {
|
||
UserInfoController userInfoController =
|
||
Get.find();
|
||
if (userInfoController.model.login !=
|
||
LoginStatus.LOGIN.code) {
|
||
TopSlideNotification.show(
|
||
context,
|
||
text: "必须登录提示".tr,
|
||
textColor:
|
||
themeController.currentColor.sc9,
|
||
);
|
||
Get.toNamed("/loginPage");
|
||
} else {
|
||
Get.toNamed("/deviceTypeList");
|
||
}
|
||
},
|
||
child: Container(
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0.rpx, 30.rpx, 0.rpx, 30.rpx),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment:
|
||
MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
SvgPicture.asset(
|
||
'assets/img/icon/my_device.svg',
|
||
width: 25.rpx,
|
||
height: 25
|
||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: stringToColor("#00C1AA"),
|
||
),
|
||
Text(
|
||
'我的.我的设备'.tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
fontSize: AppConstants()
|
||
.title_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 22.rpx)),
|
||
),
|
||
SvgPicture.asset(
|
||
'assets/img/icon/arrow_right.svg',
|
||
width: 8.rpx,
|
||
height:
|
||
15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color:
|
||
themeController.currentColor.sc3,
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
ClickableContainer(
|
||
backgroundColor: Colors.transparent, // 容器背景色
|
||
highlightColor: themeController
|
||
.currentColor.sc21, // 点击时的背景色
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||
onTap: () {
|
||
UserInfoController userInfoController =
|
||
Get.find();
|
||
if (userInfoController.model.login !=
|
||
LoginStatus.LOGIN.code) {
|
||
TopSlideNotification.show(
|
||
context,
|
||
text: "必须登录提示".tr,
|
||
textColor:
|
||
themeController.currentColor.sc9,
|
||
);
|
||
Get.toNamed("/loginPage");
|
||
} else {
|
||
// TopSlideNotification.show(
|
||
// context,
|
||
// text: "待开发.提示".tr,
|
||
// textColor:
|
||
// themeController.currentColor.sc2,
|
||
// );
|
||
Get.toNamed("/applyRepairPage");
|
||
}
|
||
},
|
||
child: Container(
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
40.rpx, 30.rpx, 40.rpx, 30.rpx),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment:
|
||
MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
SvgPicture.asset(
|
||
'assets/img/icon/device_repair.svg',
|
||
width: 25.rpx,
|
||
height: 25
|
||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: stringToColor("#00C1AA"),
|
||
),
|
||
Text(
|
||
'我的.设备报修'.tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
fontSize: AppConstants()
|
||
.title_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 22.rpx)),
|
||
),
|
||
SvgPicture.asset(
|
||
'assets/img/icon/arrow_right.svg',
|
||
width: 8.rpx,
|
||
height:
|
||
15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color:
|
||
themeController.currentColor.sc3,
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
ClickableContainer(
|
||
backgroundColor: Colors.transparent, // 容器背景色
|
||
highlightColor: themeController
|
||
.currentColor.sc21, // 点击时的背景色
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||
onTap: () async {
|
||
UserInfoController userInfoController =
|
||
Get.find();
|
||
if (userInfoController.model.login !=
|
||
LoginStatus.LOGIN.code) {
|
||
TopSlideNotification.show(
|
||
context,
|
||
text: "必须登录提示".tr,
|
||
textColor:
|
||
themeController.currentColor.sc9,
|
||
);
|
||
Get.toNamed("/loginPage");
|
||
} else {
|
||
// TopSlideNotification.show(
|
||
// context,
|
||
// text: "待开发.提示".tr,
|
||
// textColor:
|
||
// themeController.currentColor.sc2,
|
||
// );
|
||
String url =
|
||
"https://mp.weixin.qq.com/s/kwfTxy8d_cDU0j10mZWMgA";
|
||
String serviceAddress =
|
||
ServiceConstant.service_address;
|
||
String serviceName =
|
||
ServiceConstant.server_service;
|
||
String serviceApi =
|
||
ServiceConstant.user_setting;
|
||
String queryUrl =
|
||
"$serviceAddress$serviceName$serviceApi";
|
||
String type = "app_op_desc";
|
||
String code = "th";
|
||
if (AppConstants().ent_type ==
|
||
APPPackageType.TH.code) {
|
||
code = "th";
|
||
} else if (AppConstants().ent_type ==
|
||
APPPackageType.HUANSHUI.code) {
|
||
code = "hs";
|
||
} else {
|
||
code = 'th';
|
||
}
|
||
queryUrl =
|
||
"$queryUrl?type=$type&code=$code";
|
||
await requestWithLog(
|
||
logTitle: "查询操作说明",
|
||
method: MyHttpMethod.get,
|
||
queryUrl: queryUrl,
|
||
onSuccess: (res) {
|
||
url = res.data['url'];
|
||
},
|
||
);
|
||
Get.toNamed("/helpPage", arguments: url);
|
||
}
|
||
},
|
||
child: Container(
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
40.rpx, 30.rpx, 40.rpx, 30.rpx),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment:
|
||
MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
SvgPicture.asset(
|
||
'assets/img/icon/op_ex.svg',
|
||
width: 25.rpx,
|
||
height: 25
|
||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: stringToColor("#00C1AA"),
|
||
),
|
||
Text(
|
||
'我的.操作说明'.tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
fontSize: AppConstants()
|
||
.title_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 22.rpx)),
|
||
),
|
||
SvgPicture.asset(
|
||
'assets/img/icon/arrow_right.svg',
|
||
width: 8.rpx,
|
||
height:
|
||
14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color:
|
||
themeController.currentColor.sc3,
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
ClickableContainer(
|
||
backgroundColor: Colors.transparent, // 容器背景色
|
||
highlightColor: themeController
|
||
.currentColor.sc21, // 点击时的背景色
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||
onTap: () {
|
||
UserInfoController userInfoController =
|
||
Get.find();
|
||
if (userInfoController.model.login !=
|
||
LoginStatus.LOGIN.code) {
|
||
TopSlideNotification.show(
|
||
context,
|
||
text: "必须登录提示".tr,
|
||
textColor:
|
||
themeController.currentColor.sc9,
|
||
);
|
||
Get.toNamed("/loginPage");
|
||
} else {
|
||
// TopSlideNotification.show(
|
||
// context,
|
||
// text: "待开发.提示".tr,
|
||
// textColor:
|
||
// themeController.currentColor.sc2,
|
||
// );
|
||
Get.toNamed("/followPage");
|
||
}
|
||
},
|
||
child: Container(
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0.rpx, 30.rpx, 0.rpx, 30.rpx),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment:
|
||
MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
SvgPicture.asset(
|
||
'assets/img/icon/like.svg',
|
||
width: 25.rpx,
|
||
height: 25
|
||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: stringToColor("#00C1AA"),
|
||
),
|
||
Text(
|
||
'我的.关注我们'.tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
fontSize: AppConstants()
|
||
.title_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 22.rpx)),
|
||
),
|
||
SvgPicture.asset(
|
||
'assets/img/icon/arrow_right.svg',
|
||
width: 8.rpx,
|
||
height:
|
||
15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color:
|
||
themeController.currentColor.sc3,
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
ClickableContainer(
|
||
backgroundColor: Colors.transparent, // 容器背景色
|
||
highlightColor: themeController
|
||
.currentColor.sc21, // 点击时的背景色
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||
onTap: () async {
|
||
// UserInfoController userInfoController =
|
||
// Get.find();
|
||
// if (userInfoController.model.login !=
|
||
// LoginStatus.LOGIN.code) {
|
||
// TopSlideNotification.show(
|
||
// context,
|
||
// text: "必须登录提示".tr,
|
||
// textColor:
|
||
// themeController.currentColor.sc9,
|
||
// );
|
||
// Get.toNamed("/loginPage");
|
||
// } else {
|
||
// String logContent =
|
||
// await DailyLogUtils.readLogByDate(
|
||
// DateTime(2025, 9, 4));
|
||
// print(logContent);
|
||
// // DailyLogUtils.readTodayLog();
|
||
// // DailyLogUtils.listLogFiles();
|
||
// await DailyLogUtils.writeLog(
|
||
// "测试日志内容"); // 确保写入日志
|
||
// await DailyLogUtils
|
||
// .exportAllLogs(); // 导出并分享
|
||
|
||
// // DailyLogUtils.exportAllLogs();
|
||
// }
|
||
},
|
||
child: Container(
|
||
child: Padding(
|
||
padding: EdgeInsetsDirectional.fromSTEB(
|
||
0.rpx, 30.rpx, 0.rpx, 30.rpx),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
mainAxisAlignment:
|
||
MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
SvgPicture.asset(
|
||
'assets/img/icon/version.svg',
|
||
width: 25.rpx,
|
||
height: 25
|
||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: stringToColor("#00C1AA"),
|
||
),
|
||
Text(
|
||
'我的.当前版本'.tr,
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
fontSize: AppConstants()
|
||
.title_text_fontSize,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
].divide(SizedBox(width: 22.rpx)),
|
||
),
|
||
Row(
|
||
mainAxisSize: MainAxisSize.max,
|
||
children: [
|
||
Text(
|
||
'${AppConstants.theh_app_version}',
|
||
style: TextStyle(
|
||
fontFamily: 'Inter',
|
||
// color: Color(0xFFD9E3EB),
|
||
color: themeController
|
||
.currentColor.sc4,
|
||
fontSize: 26.rpx,
|
||
letterSpacing: 0.0,
|
||
),
|
||
),
|
||
SvgPicture.asset(
|
||
'assets/img/icon/arrow_right.svg',
|
||
width: 8.rpx,
|
||
height: 15
|
||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||
color: themeController
|
||
.currentColor.sc3,
|
||
),
|
||
].divide(SizedBox(width: 28.rpx)),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
]
|
||
.divide(SizedBox(height: 0.rpx))
|
||
.addToStart(SizedBox(height: 30.rpx))
|
||
.addToEnd(SizedBox(height: 30.rpx)),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|
||
|
||
String limitText(String? text, int maxLength) {
|
||
if (text == null || text.isEmpty) return '';
|
||
if (text.characters.length <= maxLength) return text;
|
||
|
||
return text.characters.take(maxLength).toString() + '...';
|
||
}
|