请在此处输入图像描述我需要删除容器小部件并将边框半径添加到文本小部件,或者是否可以使文本小部件和容器小部件一起响应更改(意思是:当文本为空时容器应该' t 显示)
child: Container(
padding: EdgeInsets.fromLTRB(25.0, 0, 10.0, 0),
decoration: ShapeDecoration(
color: Colors.grey[850],
shape: RoundedRectangleBorder(
side: BorderSide(
width: 2.0,
style: BorderStyle.solid,
color: Colors.black,
),
borderRadius:
BorderRadius.all(Radius.circular(15.0)),
),
),
child: Text(
costOfSales,
style: TextStyle(
`enter code here` color: Colors.white,
fontSize: 25.0,
),
)),