title: GestureDetector not working in Stack widget
body: <p>So I'm trying to make a <code>Stack</code> of two buttons using <code>GestureDetector</code> where if I press one, it will overlap the other by half. But it's not detecting any gestures like <code>onTap</code>. I tried changing to <code>InkWell</code> and <code>TextButton</code> but it still doesn't work. I also tried to change the <code>behavior</code> but that too doesn't work. Can anyone help me solve this one?</p>
  <p>Here's a snippet of the code:</p>
  <pre><code>class StatistikDanLeaderboard extends StatelessWidget {
    final bool ispressed1;
    final bool ispressed2;
    final void Function() function1;
    final void Function() function2;
    const StatistikDanLeaderboard({
      Key key,
      this.ispressed1,
      this.ispressed2,
      this.function1,
      this.function2,
    }) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      if (ispressed1) {
        return Stack(
          alignment: Alignment.centerLeft,
          children: [
            GestureDetector(
              behavior: HitTestBehavior.opaque,
              onTap: () =&gt; function1,
              child: Container(
                padding: EdgeInsets.only(right: 46.9),
                alignment: Alignment.centerRight,
                height: 29,
                width: 372,
                child: Text(
                  'Leaderboard',
                  style: TextStyle(
                    fontFamily: fontFamily1,
                    fontSize: fontSize2,
                    fontWeight: fontWeightThin,
                    color: Color.fromRGBO(51, 51, 51, 0.25),
                    letterSpacing: letterSpacingDefault,
                  ),
                ),
                decoration: BoxDecoration(
                  color: objectWhite,
                  border: Border.all(color: borderColorGrey),
                  borderRadius: BorderRadius.circular(20),
                ),
              ),
            ),
            GestureDetector(
              behavior: HitTestBehavior.translucent,
              onTap: () =&gt; function2,
              child: Container(
                alignment: Alignment.center,
                child: Text(
                  'Statistik',
                  style: TextStyle(
                      fontFamily: fontFamily1,
                      fontWeight: fontWeightThick,
                      fontSize: fontSize2,
                      color: objectWhite,
                      letterSpacing: letterSpacingDefault),
                ),
                height: 29,
                width: 190.43,
                decoration: BoxDecoration(
                  color: clickable1,
                  borderRadius: BorderRadius.circular(20),
                ),
              ),
            ),
          ],
        );
  </code></pre>