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),
                      ],
                    ),
                  )
                ],
              ),
相关推荐
异常君6 分钟前
@Bean 在@Configuration 中和普通类中的本质区别
java·spring·面试
jackson凌7 分钟前
【Java学习笔记】Math方法
java·笔记·学习
风之舞_yjf31 分钟前
Vue基础(14)_列表过滤、列表排序
前端·javascript·vue.js
你不是我我1 小时前
【Java开发日记】说一说 SpringBoot 中 CommandLineRunner
java·开发语言·spring boot
yuan199971 小时前
Spring Boot 启动流程及配置类解析原理
java·spring boot·后端
2301_807606431 小时前
Java——抽象、接口(黑马个人听课笔记)
java·笔记
BillKu1 小时前
scss(sass)中 & 的使用说明
前端·sass·scss
楚歌again1 小时前
【如何在IntelliJ IDEA中新建Spring Boot项目(基于JDK 21 + Maven)】
java·spring boot·intellij-idea
酷爱码1 小时前
IDEA 中 Maven Dependencies 出现红色波浪线的原因及解决方法
java·maven·intellij-idea