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

View File

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