修改样式
This commit is contained in:
@@ -137,10 +137,10 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
||||
apiResponse.msg = "昵称为空".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
if (user.tmpNickName!.length >= 9) {
|
||||
apiResponse.msg = "最长字符为8个字".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
// if (user.tmpNickName!.length >= 9) {
|
||||
// apiResponse.msg = "最长字符为8个字".tr;
|
||||
// return apiResponse;
|
||||
// }
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.user_info;
|
||||
|
||||
@@ -165,11 +165,14 @@ class _MinePageState extends State<MinePage> {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
login == 1
|
||||
? (userInfoController.model
|
||||
.user!.nick_name ??
|
||||
'未命名'.tr)
|
||||
: "未命名".tr,
|
||||
limitText(
|
||||
login == 1
|
||||
? userInfoController
|
||||
.model.user?.nick_name
|
||||
: '未命名'.tr,
|
||||
AppConstants()
|
||||
.text_length, // 这里设置最大长度,按你需求改,比如 6~10 字符
|
||||
),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
color: themeController
|
||||
@@ -678,3 +681,10 @@ class _MinePageState extends State<MinePage> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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() + '...';
|
||||
}
|
||||
|
||||
@@ -212,7 +212,6 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
|
||||
isDense: true,
|
||||
labelStyle: TextStyle(
|
||||
letterSpacing: 0.0,
|
||||
|
||||
),
|
||||
hintText: "设备参数提示".tr,
|
||||
hintStyle: TextStyle(
|
||||
@@ -293,7 +292,6 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
|
||||
isDense: true,
|
||||
labelStyle: TextStyle(
|
||||
letterSpacing: 0.0,
|
||||
|
||||
),
|
||||
hintText: '问题描述'.tr,
|
||||
hintStyle: TextStyle(
|
||||
@@ -345,6 +343,7 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
|
||||
borderRadius: 20.rpx,
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () async {
|
||||
return;
|
||||
ApiResponse apiResponse = await repairController.uploadImg();
|
||||
print(apiResponse);
|
||||
if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
|
||||
@@ -287,6 +287,7 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
|
||||
// controller: TextEditingController(),
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
maxLength: 60,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelStyle: TextStyle(
|
||||
|
||||
@@ -262,7 +262,7 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 21.rpx, 30.rpx, 0),
|
||||
0.rpx, 21.rpx, 0.rpx, 0),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc5,
|
||||
|
||||
@@ -104,7 +104,7 @@ Widget WeekDataWidget(
|
||||
displayMode: ChartDisplayMode.bar,
|
||||
barColors:
|
||||
buildWeekDatesAndPoints(sleepReport['scoreList'])['colors'],
|
||||
tips: buildValueTexts(sleepReport['scoreList']['data'], '分', 1),
|
||||
tips: buildValueTexts(sleepReport['scoreList']['data'], '分'.tr, 1),
|
||||
xUnit: sleepReport['scoreList']['yUnit'],
|
||||
barWidth: 0.2,
|
||||
),
|
||||
|
||||
@@ -291,7 +291,7 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
|
||||
),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
|
||||
Reference in New Issue
Block a user