1) If I have this, when I tap the child Container it doesn't print 'tap':
Container(
color: Colors.red,
child: GestureDetector(
onTap: () => print('tap'),
child: Container(
width: 100,
height: 100,
),
),
),
2) If I have this, when I tap the child Container it prints 'tap':
Container(
color: Colors.red,
child: GestureDetector(
onTap: () => print('tap'),
child: Container(
width: 100,
height: 100,
decoration: BoxDecoration(),
),
),
),
3) If I have this, when I tap the child Container, outside the text, it prints 'tap':
Container(
color: Colors.red,
child: GestureDetector(
onTap: () => print('tap'),
child: Container(
width: 100,
height: 100,
child: Text("A"),
),
),
),
Can someone explain me these 3 behaviors?
