如何消除颤动上文本上方和下方的间隙

编程入门 行业动态 更新时间:2024-10-22 14:26:08
本文介绍了如何消除颤动上文本上方和下方的间隙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图将文本Hello"放在123"的正下方,但文本越大,差距越大.怎么消除缝隙???Flutter 图像添加在下面.

I am trying to put the text "Hello" right below the "123", but the bigger the text is, the bigger the gap. How do I remove the gap??? Flutter images are added below.

推荐答案

到目前为止我能找到的唯一方法是减少 height 属性,但问题是它只减少了上面的差距.因此,在您的情况下,您可以尝试将 hello 文本设置为最小:

The only way I could find so far is to reduce height property, the problem though is that it reduces the gap above only. So in your case, you could try to set it for hello text to the minimum:

Text( '123', style: TextStyle(fontSize: 60.0), ), Text( 'hello', style: TextStyle(fontSize: 10.0, height: 0.1), ),

更多推荐

如何消除颤动上文本上方和下方的间隙

本文发布于:2023-06-07 21:57:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/568500.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:间隙   文本

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!