发布于 4年前

flutter 文字背景色

Text(
  '我的背景色是红色的',
  style: TextStyle(
    // 创建 paint 对象,设置 color 属性为想要的颜色
    background: Paint()..color = Colors.red
  ),
)
©2020 edoou.com   京ICP备16001874号-3