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),
                      ],
                    ),
                  )
                ],
              ),
相关推荐
果果软件3 小时前
2026 后台管理系统选型:若依、JeecgBoot、芋道、NocoBase 和 GewuMind Boot 怎么选?
java·人工智能·后端·ai·开源
码云社区6 小时前
Java家政服务系统源码:人员技能、服务范围与多商家业务落地
java·开发语言·家政服务·家政小程序·家政系统
FRing037 小时前
vue3干货总结3(defineOptions(Vue3.3)、defineModel(Vue3.4)、Pinia)
开发语言·前端·vue.js·vue3
Bczheng17 小时前
组件化服务端渲染模式SSR
前端
摇滚侠7 小时前
《On Java 中文版 基础卷》阅读笔记 接口 18
java·笔记·python
CoderYanger7 小时前
Java EE 进阶:9.MyBatis 操作数据库(进阶)(第八弹):MyBatis Generator
java·数据库·spring boot·spring·java-ee·tomcat·mybatis
whitelbwwww8 小时前
CUDA C++实战--中级
开发语言·前端·c++
张紫娃8 小时前
Chrome插件-Stylus(屏蔽博客广告)
前端·chrome·stylus
好的佩奇8 小时前
Dart 之元数据与注解
android·flutter·dart
Yannik8 小时前
在 Apple Silicon Mac 上用 Jenkins + Fastlane 搭建 iOS CI:从自动打包到 MR 检查流水线的完整实践
前端