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 :设置线条的颜色

相关推荐
blanks202011 小时前
如何查看 drift 在 本机的 sqlite 文件路径
flutter
m0_7381858218 小时前
Flutter 鸿蒙化实战:flutter_iot_wifi 适配 OpenHarmony,IoT 设备 WiFi 配网
物联网·flutter·华为·harmonyos·鸿蒙
律宏阔1 天前
Flutter Riverpod 3:统一打印 Provider 错误与自动重试日志
前端·flutter
m0_738185822 天前
Flutter 鸿蒙化实战:flutter_exif_plugin 适配 OpenHarmony,图片 EXIF 读写
flutter·华为·harmonyos·鸿蒙
恋猫de小郭2 天前
Shopify 回应为什么从 RN 回到原生,为什么不用 KMP ?
android·前端·flutter
事圆则缓2 天前
Flutter 状态管理框架对比(五):GetX 的响应式、依赖注册与生命周期
前端·javascript·flutter
事圆则缓2 天前
Flutter 状态管理框架对比(六):同一个购物车,四种方案怎么落地?
前端·javascript·flutter
恋猫de小郭3 天前
Android 原生的 Compose A2UI 也来了,你还抱着 XML 养老吗?
android·前端·flutter
事圆则缓3 天前
Flutter 状态管理框架对比(三):Riverpod 如何连起购物车与异步价格
开发语言·javascript·flutter