上面的代码中标题字体需要加粗
时间: 2024-02-27 16:51:18 浏览: 27
好的,你可以按照以下方式修改示例代码来实现标题字体加粗:
```
Container(
padding: EdgeInsets.symmetric(horizontal: 10.0),
child: Row(
children: <Widget>[
Text(
'标题',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold, // 修改字体加粗
color: Colors.white,
),
),
SizedBox(width: 10.0),
Expanded(
child: TextFormField(
style: TextStyle(color: Colors.white),
decoration: InputDecoration(
hintText: '请输入内容',
hintStyle: TextStyle(color: Colors.white54),
border: InputBorder.none,
),
),
),
],
),
)
```
在这个示例中,我们在`TextStyle`中添加了`fontWeight: FontWeight.bold`来将标题的字体加粗。