本文介绍了如何消除颤动上文本上方和下方的间隙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图将文本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), ),更多推荐
如何消除颤动上文本上方和下方的间隙
发布评论