简体   繁体   English

文本下划线显示文本上方而不是下方的行

[英]Text underline display line above text instead of below

在此处输入图片说明 As showing the given image After applying underline decoration text style to the text it shows line above text instead of below in flutter 2.2.如显示给定的图像在对文本应用下划线装饰文本样式后,它在文本上方显示一行而不是在 flutter 2.2 下方。

 TextButton(
              onPressed: () {},
              child: Text(
                getLocalValue(context, txtTermsNConditions),
                style: TextStyle(
                    fontSize: 12.sp,
                    fontWeight: fwMedium,
                    color: Color(clrPrimary),
                    decoration: TextDecoration.underline),
              ),
            )

您可以使用快捷方式来完成,只需使用Stack并将TextDivider小部件放入其中,然后根据您的要求给出位置即可。

style: TextStyle(decoration: TextDecoration.overline) will do the trick see this link for more information. style: TextStyle(decoration: TextDecoration.overline)可以解决问题,请参阅此链接以获取更多信息。

这是我使用的字体的问题,使用另一种字体已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM