Flutter之Text 组件的使用

在dart文件下的添加下面的标签
new Text(
  '我是这个测试',
   style: TextStyle(
       color:const Color(0xffffff00),
     decoration:TextDecoration.lineThrough,  //不显示装饰线条
     decorationStyle: TextDecorationStyle.wavy,
       decorationColor: Colors.red,
     fontSize: 15.0,
     fontStyle: FontStyle.italic,
     fontFamily:'',
     fontWeight: FontWeight.w100,
   ),
  //段落间的样式
  strutStyle: StrutStyle(
      fontSize: 25.0,
    height: 2,
    leading: 2.0,
    fontWeight: FontWeight.w100,
    fontStyle: FontStyle.normal,
    forceStrutHeight:true,
  ),
),
发布了368 篇原创文章 · 获赞 22 · 访问量 20万+

猜你喜欢

转载自blog.csdn.net/BianHuanShiZhe/article/details/104749744
今日推荐