美文网首页
Flutter之Text

Flutter之Text

作者: GitArtOS | 来源:发表于2024-07-17 10:49 被阅读0次
    截屏2024-07-18 10.44.11.png
    
    class MyText extends StatelessWidget {
      const MyText({super.key});
    
      @override
      Widget build(BuildContext context) {
        return  Text("Hello world! I'm Jack.Hello world! I'm Jack.Hello world! I'm Jack.v ",
          textAlign: TextAlign.center,
          textScaler: TextScaler.linear(1.5),
          style: TextStyle(
            fontSize: 20,
            overflow: TextOverflow.ellipsis,
            fontWeight: FontWeight.bold,
            color: Colors.red,
            fontFamily: "微软雅黑",
            decoration: TextDecoration.underline,
            decorationColor: Colors.green,
            decorationStyle: TextDecorationStyle.wavy,
            decorationThickness: 2,
            letterSpacing: 2,
            wordSpacing: 2,
            background: Paint()
              ..color = Colors.yellow
              ..style = PaintingStyle.stroke
              ..strokeWidth = 2,
          )
        );
      }
    }
    

    相关文章

      网友评论

          本文标题:Flutter之Text

          本文链接:https://www.haomeiwen.com/subject/omslhjtx.html