InkWell ripple over top of image in GridTile in Flutter. I was able to get a ripple to appear over the image by using a Stack and wrapping the InkWell in a Material widget.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | return new Stack(children: <Widget>[ new Positioned.fill( bottom: 0.0, 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(s.imageSrc, fit: BoxFit.cover)), ), new Positioned.fill( child: new Material( color: Colors.transparent, child: new InkWell( splashColor: Colors.lightGreenAccent, onTap: () => _launchStream(s.displayName), ))), ]); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.