child: Container(
child: Row(
children: [
const SizedBox(width: 10),
SizedBox(
height: 55,
width: 55,
child: CircleAvatar(
radius: 55.0,
backgroundColor: Theme.of(context).colorScheme.surface,
child: Image.asset(
'assets/images/welcome01.png',
),
),
),
就是原代码,完全没改,但是把图片地址换成任意的不是圆形的普通图片,比如换成欢迎页的welcome01.png,头像就显示的是方形,不是圆形?那这个组件不是很傻吗?只能用背景是透明的头像,那用户自己上传自己的照片也不是圆形了