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

相关推荐
程序员老刘9 小时前
为什么我从不推荐GetX?11k星标背后的真相
flutter·客户端
dragon72515 小时前
flutter riverpod原理浅析
flutter
恋猫de小郭16 小时前
深入理解 Flutter 的 PlatformView 如何在鸿蒙平台实现混合开发
android·前端·flutter
浅蓝色16 小时前
flutter平台判断后续
flutter·harmonyos
猪哥帅过吴彦祖16 小时前
Flutter 系列教程:常用基础组件 (下) - `TextField` 和 `Form`
前端·flutter·ios
我想吃辣条17 小时前
flutter google play 应用不支持 16 KB
android·flutter
LinXunFeng18 小时前
Flutter - Melos Pub workspaces 实践
前端·flutter·架构
勤劳打代码1 天前
妙笔生花 —— Flutter 实现飞入动画
前端·flutter·设计模式
我想吃辣条1 天前
flutter mapbox_maps_flutter 应用不支持 16 KB
flutter