Flutter常用控件-Text

body:new Center(

child:new Text('hello,恶犬恶趣味课间操丹江口市;剖出你的歌,挨打梦幻公主病发我梨花大鼓他吧',

textAlign: TextAlign.center, 

maxLines:1,

overflow: TextOverflow.fade,

style: TextStyle(

fontSize:12,

color: Color.fromARGB(255,255,100,100),

decoration: TextDecoration.underline, //文字加横线

decorationStyle: TextDecorationStyle.solid)),//文字加横线的样式

),

文字对齐方式 textAlign: TextAlign.center,

最多显示几行 maxLines:1,

文字超出部分怎么处理   overflow: TextOverflow.clip        直接切掉

                                          overflow: TextOverflow.ellipsis  末尾多。。。

                                          overflow: TextOverflow.fade      文字从上到下渐变消失

你可能感兴趣的:(Flutter常用控件-Text)