【发布时间】:2019-05-25 06:43:18
【问题描述】:
我正在使用 CicleAvatar 显示我的头像,但它没有显示圆形。 这是我的代码
//Circle Image
Widget circularImage(){
return new CircleAvatar(
radius: 45,
child: CachedNetworkImage(
imageUrl: this.strImageURL,
placeholder: new CircularProgressIndicator(),
errorWidget: new Icon(Icons.error),
)
);
}
【问题讨论】:
-
您需要使用 backgroundImage:property 以使其适合 Circle。 stackoverflow.com/a/53514007/10269042
-
@anmol.majhail 你应该让你的评论成为答案,因为这是正确的实际答案