Flutter Text 下划线

Dart 复制代码
IntrinsicWidth(
                                          child: Column(
                                            mainAxisAlignment:
                                                MainAxisAlignment.center,
                                            children: [
                                              Text(
                                                "工单名称",
                                                style: TextStyle(
                                                  overflow: TextOverflow.fade,
                                                  color: AppColors.baseColor,
                                                  fontSize: 15.sp,
                                                  // decorationStyle: TextDecorationStyle.dashed
                                                ),
                                              ),
                                              Container(
                                                margin: EdgeInsets.only(top: 1.h),
                                                height: 1.h,
                                                color: AppColors.baseColor,
                                              )
                                            ],
                                          ),
                                        ),

系统自带的下划线、 删除线

decoration :TextDecoration可在文字上 中 下方添加直线

decorationStyle :extDecorationStyle 可指定线条样式,如直线、虚线、波浪线、双实线、点线

decorationThickness :设置线条的宽度

decorationColor :设置线条的颜色

相关推荐
不羁的木木4 小时前
给鸿蒙 App 增加用系统应用打开文件的能力 —— open_app_file 的鸿蒙使用指南
flutter·harmonyos
HouWan6 小时前
Flutter: MediaQuery.of(context) 为什么可能拖慢页面?
android·flutter·ios
西西学代码11 小时前
flutter---井字游戏
flutter
tushanxing12 小时前
Day 2: 容器与单子布局基础
flutter
程序员老刘1 天前
跨平台开发地图 | 2026年9月
flutter·客户端
HouWan1 天前
Flutter iOS UISceneDelegate 迁移指南:理清新的 Scene 生命周期
flutter·ios·app
技术任我行XTing1 天前
【DFX系列】Flutter 鸿蒙应用外接纹理介绍及问题定位
flutter·harmonyos
恋猫de小郭2 天前
Flutter GSoC 2026 提案进度解读,补上 DevTools、FFI 和原生平台的关键缺口
android·前端·flutter