尝试使用InkWell功能(onHover)放大我的图片(使用ClipPath进行裁剪),但当我悬停在图片上时,没有任何反应。
InkWell(
onTap: () {},
onHover: (isHovering) {
if (isHovering) {
setState(() {
sizeBool = !sizeBool;
});
}
},
child: ClipPath(
child: AnimatedContainer(
duration: Duration(seconds: 1),
width: MediaQuery.of(context).size.width,
height: sizeBool ? 450 : 150,
child: Image.network(
'image.url',
fit: BoxFit.cover,
),
),
clipper: CustomClipPath(),
),
)
],
)
],
),
),
),
);
}
}