InkWell(
onTap: () {
print('on tap event');
},
child: CachedNetworkImage(
imageUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSgjoaDvMpuEfm96oHtpEVbwtfIscO8GPuTsA&usqp=CAU',
imageBuilder: (context, imageProvider) => Container(
width: 80.0,
height: 80.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
),
placeholder: (context, url) => CircularProgressIndicator(),
errorWidget: (context, url, error) => Icon(Icons.error),
),
),
我想在flutter中使用chached_nework_image包显示我的图像,我也希望这些图像是圆形的,并且具有on tap事件,我试图满足所有这些要求,但是我有一个问题,那就是效果在点击事件中,波动不是平方的平方,任何人都可以帮我提出一个好主意,自定义波动并使之变为圆形,甚至以不同的方式做出整体解决方案。
答案 0 :(得分:0)
Flutter类的文档非常详尽,并为您提供了可以查看的替代/附加类的列表。如果您查看InkWell
中的文档,将会发现:
/// * [InkResponse], a variant of [InkWell] that doesn't force a rectangular
/// shape on the ink reaction.