title: Does setState() need to be recall for every GestureDetector i used?
body: <p>So again ,I was making my game app using flutter framework . and i tried using mutiple GestureDetectors on my game page.</p>
  
  <p>so i tried not to repeat my function code that should be called when i tap that GestureDetector by declaring it outside Widget Build(). </p>
  
  <p>and then something weird happen . for every GestureDetector that use that function . those functions already been called even before i was pressing anything on my android emulator's screen.</p>
  
  <p>So Does this mean that i have to make seperate function for every GestureDetectors i have to avoid this problem ? </p>
  
  <pre><code>Widget build(BuildContext context) {
  double w = MediaQuery.of(context).size.width;
  double h = MediaQuery.of(context).size.height;
  //debugPaintSizeEnabled = true;
  
  void playSlot(int x,int y){
    var posx = x-1;
    var posy = y-1;
    mycolor = mycolor ? false : true;
    toggle[posx][posy] = toggle[posx][posy] ? false : true;
    if(mycolor){
      slot[posx][posy] = 2;
    }
    else{slot[posx][posy] = 1;}
    print(mycolor);
  }
  
  return Scaffold(
    body: Center(
      child: Column(
        children: &lt;Widget&gt;[
          //////////////////////////Score Board ////////////////////////////////////////
          GameScore(side1Score: mainGame.getSide1Win(),side2Score: mainGame.getSide2Win(),turn: mycolor,),
          //////////////////////////Score Board ////////////////////////////////////////
  
          //////////////////////////Game Structure ////////////////////////////////////////
          Container(
            height: h/2,
            child: Container(
              child: Column(
                children: &lt;Widget&gt;[
                  Expanded(
                    child: Row(
                      children: &lt;Widget&gt;[
                        GameSlot(onTapE:(){setState(() {playSlot(1,1);});},c: toggle[0][0],id: slot[0][0]),
                        GameSlot(onTapE:(){setState(() {playSlot(1,2);});},c: toggle[0][1],id: slot[0][1]),
                        GameSlot(onTapE:(){setState(() {playSlot(1,3);});},c: toggle[0][2],id: slot[0][2]),
                      ],
                    ),
                  ),
                  Expanded(
                    child: Row(
                      children: &lt;Widget&gt;[
                        GameSlot(onTapE:(){setState(() {playSlot(2,1);});},c: toggle[1][0],id: slot[1][0]),
                        GameSlot(onTapE:(){setState(() {playSlot(2,2);});},c: toggle[1][1],id: slot[1][1]),
                        GameSlot(onTapE:(){setState(() {playSlot(2,3);});},c: toggle[1][2],id: slot[1][2]),
                      ],
                    ),
                  ),
                  Expanded(
                    child: Row(
                      children: &lt;Widget&gt;[
                        GameSlot(onTapE:(){setState(() {playSlot(3,1);});},c: toggle[2][0],id: slot[2][0]),
                        GameSlot(onTapE:(){setState(() {playSlot(3,2);});},c: toggle[2][1],id: slot[2][1]),
                        GameSlot(onTapE:(){setState(() {playSlot(3,3);});},c: toggle[2][2],id: slot[2][2]),
  </code></pre>