-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
I Have a problem with the Stack Widget.
I have a Stack that contains two children: an Image wrapped with InkWell and an IconButton.
When i click anywhere on the image, whoever is last on the Stack children list his onTap/onPressed callbacks is executed. even if i click the image and not the iconbutton, the iconbutton's onPressed is called.
how can i correct this?
My goal is to have an Image with an 'X' icon button on the right corner.
Stack(
fit: StackFit.expand,
children: <Widget>[
InkWell (
onTap: () {
setState(() {
// Not Called
});
}, child :new Image(
height: 60.0,
width: 60.0,
image: new NetworkImage("SomeImageURL"),
fit: BoxFit.fill,
)),
IconButton(
color: Theme.of(context).accentColor,
alignment: Alignment.topRight,
icon: Icon(Icons.cancel),
onPressed: () {
setState(() {
// Called even if i click the image and not the tiny IconButton which is on top
});
},
)
],
)
Metadata
Metadata
Assignees
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds