如何在文本窗口小部件上添加填充等主题中断?

时间:2018-10-16 01:43:26

标签: flutter

我不确定如何描述它,但是我想要实现的目标是:

enter image description here

这是我到目前为止尝试过的:

Text(
  "text",
  style: TextStyle(decoration: TextDecoration.underline),
)

谢谢!

1 个答案:

答案 0 :(得分:1)

也许是这样的:

Row(
      children: <Widget>[
        Expanded(child: Container(height: 1.0, color: Colors.black, margin: EdgeInsets.symmetric(horizontal: 4.0),)),
        Text('Hello world'),
        Expanded(child: Container(height: 1.0, color: Colors.black, margin: EdgeInsets.symmetric(horizontal: 4.0),)),
      ],
    ),