Flutter Text 下划线

本文介绍了如何在Flutter中使用IntrinsicWidth和Column组件创建自定义文本展示,特别关注了TextDecoration的使用,包括下划线、删除线等线条样式、颜色和宽度的设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值