Reputation: 419
Is it possible to run code on the onTapUp event in the inkwell widget, like I can on a GestureDetector? onTapUp event isn't available between the parameters while onTapDown and onTapCancel etc are, is it a bug? Is there some way I could use it?
Upvotes: 2
Views: 1028
Reputation: 854
make custom class
for example
class CustomInkWell extends StatelessWidget{
var onTabUp;
CustomInkWell({this.onTabUp});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTapUp: onTabUp,
child: InkWell(
//your code
),
);
}
}
Upvotes: 0
Reputation: 1421
InkWell
doesn't have a onTapUp
property. You can wrap InkWell
with GestureDetector
:
GestureDetector(
onTapUp: () => youFunction(), // your function goes here
child: InkWell(...),
);
Upvotes: 2