我正在尝试使用InkWell
在GridTile
中的图像上方获得涟漪效果,当用户点击瓷砖时。
我相信图像本身会遮挡涟漪,因为当我移除图像时,我可以看到涟漪。
下面是单个GridTile
的代码。
return new InkWell(
onTap: () => debugPrint(s.displayName),
highlightColor: Colors.pinkAccent,
splashColor: Colors.greenAccent,
child: new GridTile(
footer: new GridTileBar(
title: new Text(s.displayName),
subtitle: new Text(s.gameName),
backgroundColor: Colors.black45,
trailing: new Icon(
Icons.launch,
color: Colors.white,
),
),
child: new Image.network( //this is obscuring the InkWell ripple
s.imageSrc,
fit: BoxFit.cover,
),
),
);
我尝试将InkWell移动到层次结构的不同级别,使用Container中的DecorationImage,但似乎都无法显示涟漪效果。我该如何使涟漪效果显示在瓷砖/图片的上方?