Wanna implement same functionality that is done here with images:
Flutter how to change image after onTap with Gesture Detector
Im using this package: https://pub.dev/packages/flutter_svg/example
Even though I'm able to do this in IconButton, I need this in GestureDetector, not in IconButton, so just to be clear, need help how to implement SVG into GestureDetector not IconButton!
I'm able to get SVG rendered on the screen but can't figure it out how to implement it in GestureDetector, to render SVG on screen, Im doing it like this:
Expanded svgTest({double blackKeyWidth}) {
return Expanded(
child: Container(
child: IconButton(
icon: SvgPicture.asset(
'assets/images/1.svg',
fit: BoxFit.fill,
allowDrawingOutsideViewBox: true,
width: 500,
),
onPressed: null //do something,
),
),
);
}
Cant figure out how to implement SVG in GestureDetector, it can't go in as Image and Gesture Detector doesn't accept icon, or Im not doing it right.
Thank