flutter 文字一行显示,超出换行

因为app有多语言,中文和其他语言长度不一致,可能导致英文会很长。

中文样式

英文样式

代码

Dart 复制代码
 Row(
                mainAxisAlignment: MainAxisAlignment.end,
                crossAxisAlignment: CrossAxisAlignment.end,
                children: [
                  Visibility(
                    visible: controller.info.fee != null,
                    child: Expanded(
                      child: Wrap(
                        crossAxisAlignment: WrapCrossAlignment.center,
                        alignment: WrapAlignment.center,
                        children: [
                          Text(
                            "手续费:".tr,
                            style: TextStyle(
                              fontSize: 14.sp,
                              fontWeight: FontWeight.w500,
                              color: HexColor("#333333"),
                            ),
                          ),
                          Text(
                            "${controller.info.fee}",
                            style: TextStyle(
                              fontSize: 14.sp,
                              fontWeight: FontWeight.w500,
                              color: HexColor("#FF6519"),
                            ),
                          ),
                          Assets.icon.smallGoldIcon.image(width: 22.w),
                        ],
                      ),
                    ),
                  ),
                  if (controller.info.fee != null) SizedBox(width: 12.5.w),
                  Expanded(
                    child: Wrap(
                      crossAxisAlignment: WrapCrossAlignment.center,
                      alignment: WrapAlignment.center,
                      children: [
                        Text(
                          "预计金额".tr,
                          style: TextStyle(
                            fontSize: 14.sp,
                            fontWeight: FontWeight.w500,
                            color: HexColor("#333333"),
                          ),
                        ),
                        SizedBox(width: 12.w),
                        Text(
                          "${i.amount ?? 0}",
                          style: TextStyle(
                            fontSize: 20.sp,
                            fontFamily: Font.din,
                            fontWeight: FontWeight.bold,
                            color: HexColor("#FF6519"),
                          ),
                        ),
                        Assets.icon.smallGoldIcon.image(width: 22.w),
                      ],
                    ),
                  )
                ],
              ),
相关推荐
打野赵怀真20 分钟前
render函数中return如果没有使用()会有什么问题?
前端·javascript
Riesenzahn22 分钟前
写一个左中右的满屏布局,左右固定220px,中间自适应并且要优先加载
前端·javascript
Riesenzahn23 分钟前
css在页面上画一个正方形,边长为页面宽度的一半
前端·javascript
tommyrunner24 分钟前
Cursor rule文件测试 一秒了解AI行为规则文件
前端·cursor
FreemanGordon29 分钟前
Java volatile 关键字
java
北京_宏哥30 分钟前
《手把手教你》系列基础篇(九十三)-java+ selenium自动化测试-框架设计基础-POM设计模式实现-上篇(详解教程)
java·前端·selenium
Nu1134 分钟前
weakMap 和 weakSet 原理
前端·面试
顾林海36 分钟前
深入理解 Dart 函数:从基础到高阶应用
android·前端·flutter
北京_宏哥37 分钟前
《手把手教你》系列基础篇(九十二)-java+ selenium自动化测试-框架设计基础-POM设计模式简介(详解教程)
java·selenium·前端工程化