I was trying to add an "onTap" feature on the pins but the original code of the flutter_logo.dart was built around BoxDecoration, thus not allowing interactivity.
I have rewritten it this way, can it be useful? I'm new to contributions, but i would like to help.
Widget build(BuildContext context) {
final IconThemeData iconTheme = IconTheme.of(context);
final double iconSize = size ?? iconTheme.size;
final MaterialColor logoColors = colors ?? Colors.blue;
return new GestureDetector(
onTap: (){print("I am a pin");},
child: new Container(
width: iconSize,
height: iconSize,
decoration:new BoxDecoration(
image: new DecorationImage(
image: new ExactAssetImage('assets/pins/pin.png'),
fit: BoxFit.contain,
),
)
)
);
}```
I was trying to add an "onTap" feature on the pins but the original code of the flutter_logo.dart was built around BoxDecoration, thus not allowing interactivity.
I have rewritten it this way, can it be useful? I'm new to contributions, but i would like to help.