我是靠谱客的博主 迷你薯片,这篇文章主要介绍TextSpan,现在分享给大家,希望可以做个参考。

对一个Text内容不同部分按照不同样式显示

Text.rich(TextSpan(
  children:[
    TextSpan(
      text:'Home:'
    ),
    TextSpan(
      text:'urlurlurl',
      style:TextStyle(
        color:Colors.blue
      )
    )
  ]
))

文本样式可被继承

Default(
  style:TextStyle(
    color:Colors.red,
    fontSize:20.0
  ),
  textAlign:TextAlign.center
)

 

转载于:https://www.cnblogs.com/shui1993/p/11130895.html

最后

以上就是迷你薯片最近收集整理的关于TextSpan的全部内容,更多相关TextSpan内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(98)

评论列表共有 0 条评论

立即
投稿
返回
顶部