In my code I have CircleAvatar with border. I want to know if user tap exactly on border. For this I need to check if tap is inside big circle (Container), but not inside small circle (CircleAvatar).
Does anybody know how could I check this?
Widget build(BuildContext context) {
return Listener(
child: Container(
key: key,
padding: EdgeInsets.all(8.0),
decoration: ShapeDecoration(shape: CircleBorder(), color: Colors.yellow),
child: CircleAvatar(
backgroundImage: NetworkImage(widget.imgSrc),
radius: 60.0,
),
),
onPointerDown: (event) {
if (renderBox == null) {
renderBox = key.currentContext?.findRenderObject();
}
Rect rect = renderBox.paintBounds;
// todo ......
},
);
}