我有圆形头像。我想circle's avatar
在avatar
. 但我不能这样做。当我运行下面的代码时,text
出现在avatar
.
我的代码
child: Container(
height: 60.0,
width: 60.0,
margin: EdgeInsets.all(6.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100.0),
boxShadow: [
new BoxShadow(
color: Color.fromARGB(100, 20, 0, 0),
blurRadius: 5.0,
offset: Offset(5.0, 5.0))
],
border: Border.all(
width: 2.0,
style: BorderStyle.solid,
color: Colors.purple),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage(userData[x]["image"]))),
child: new Text(userData[x]["name"], style: TextStyle(fontSize: 20.0),),
)
));