fix: 添加锁中“找不到锁?点此查看”有的国家翻译文字多时会显示不全已修复

This commit is contained in:
wuyaxi 2025-07-16 16:30:14 +08:00
parent 7aac21fee8
commit fb7380c453
2 changed files with 26 additions and 11 deletions

View File

@ -44,10 +44,16 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'摸亮触摸屏'.tr,
style: TextStyle(
fontSize: 24.sp,
Flexible(
child: Text(
'摸亮触摸屏'.tr,
style: TextStyle(
fontSize: 24.sp,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
softWrap: true,
),
),
],

View File

@ -76,17 +76,26 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
),
],
),
child: Row(
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
alignment: WrapAlignment.center,
children: [
Icon(Icons.help_outline,
color: AppColors.touristColor, size: 22.w),
SizedBox(width: 6.w),
Text(
'找不到锁?点此查看。'.tr,
style: TextStyle(
color: AppColors.touristColor,
fontSize: 20.sp,
fontWeight: FontWeight.w500,
ConstrainedBox(
constraints: BoxConstraints(
maxWidth: 1.sw - 80.w), // icon和padding宽度
child: Text(
'找不到锁?点此查看。'.tr,
style: TextStyle(
color: AppColors.touristColor,
fontSize: 18.sp,
fontWeight: FontWeight.w500,
),
maxLines: 3, // 3
overflow: TextOverflow.ellipsis, //
softWrap: true, //
),
),
],