简体   繁体   English

是否可以更改下划线的长度?

[英]Is it possible to change the length of the underline?

Here's what I have, I want my underline to be shorter in length and centered.这就是我所拥有的,我希望我的下划线长度更短且居中。

 TextButton(
            child: Text ('Beverages', style: TextStyle(
                fontFamily: 'Milkshake', fontSize: 60,
                shadows: [Shadow(color: Colors.white, offset: Offset(0, -20),),],
                color: Colors.transparent,
                decoration: TextDecoration.underline,
                decorationColor: Colors.white, decorationThickness: 0.3),),
            style: TextButton.styleFrom (
              backgroundColor: Color (0xFF2D4067),),
            onPressed: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => FourthRoute(),),);
            }
        ),

Yes, and for this you should use the Divider widget, and set the indent to your desired value是的,为此您应该使用Divider小部件,并将indent设置为您想要的值

More Information on the Flutter Docs 有关 Flutter 文档的更多信息

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

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