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( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Flexible(
'摸亮触摸屏'.tr, child: Text(
style: TextStyle( '摸亮触摸屏'.tr,
fontSize: 24.sp, 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: [ 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(
'找不到锁?点此查看。'.tr, constraints: BoxConstraints(
style: TextStyle( maxWidth: 1.sw - 80.w), // icon和padding宽度
color: AppColors.touristColor, child: Text(
fontSize: 20.sp, '找不到锁?点此查看。'.tr,
fontWeight: FontWeight.w500, style: TextStyle(
color: AppColors.touristColor,
fontSize: 18.sp,
fontWeight: FontWeight.w500,
),
maxLines: 3, // 3
overflow: TextOverflow.ellipsis, //
softWrap: true, //
), ),
), ),
], ],