我将容器的形状更改为圆形并使用 InkWell onTap 方法覆盖以添加照片。但是当点击水龙头时,涟漪效果总是显示矩形。这是我的代码。
Widget build(BuildContext context) {
return InkWell(
onTap: onUploadPhoto,
child: Container(
width: getScreenWidthRation(120),
height: getScreenHeightRation(120.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(120),
color: Color(0xFFF5F6F9),
//shape: BoxShape.circle,
),
//ClipOval(child: Image.file(imageFile,fit: BoxFit.cover,),)
child: imageFile != null ? CircleAvatar(backgroundImage: FileImage(imageFile),radius: 120,): Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
svgIcon,
color: custPrimaryColor,
),
SizedBox(
height: getScreenHeightRation(5),
),
Text(
statusTxt,
textAlign: TextAlign.center,
),
],
),
),
);
}