title: Flutter : how to make an entire row clickable
body: <p>How do I make the entire row clickable in flutter?. I have the following code wrap in a "GestureDetector".  The individual items in the row are clickable but white space around the widget are not. </p>
  
  <pre><code>if ((auth.isLoggedIn)) ...[
     GestureDetector(
       onTap: () {
          auth.signOut();
       },
       child: buildItem(
          Image.asset("assets/images/logoff.png",),
          "logout"
       ),
     ),
  ],
  </code></pre>
  
  <p>This is the "buildItem" method</p>
  
  <pre><code>Widget buildItem(Widget icon, String title) {
      return Padding(
        padding: const EdgeInsets.only(left: 20, right: 15),
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: &lt;Widget&gt;[
            Container(
                child: Row(
              children: &lt;Widget&gt;[
                icon,
                SizedBox(width: 20.0),
                Text(
                  title,
                  style: TextStyle(
                    fontSize: 16.0,
                  ),
                ),
              ],
            )),
            Icon(
              Icons.arrow_forward_ios,
              size: 20.0,
            ),
          ],
        ),
      );
    }
  </code></pre>
  
  <p>This is the output. Each item in the row (icon, text and the >)  respond to the tap gesture.  However,  the white space(e.g between the text and the ">") does not respond to tap</p>
  
  <p>How can I make entire row respond to the tap.</p>
  
  <p><a href="https://i.stack.imgur.com/7asvf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7asvf.png" alt="enter image description here"></a></p>