title: Control the order of buttons to select from
body: <p>How can I control the order of the button selection on a project I'm currently working on.</p>
  
  <p>The project has a couple of buttons on gesture detection and I'm wondering if there is a way to let the user select a certain button before the other. Is the Navigation Class helpful in this case? All the buttons are on the same page. THANK YOU!</p>
  
  <p>EDIT: This is the code</p>
  
  <pre><code>enum Talba {
    Bab,
    Sita,
    Saba,
    Thimanya,
    Bawan,
  }
  
  enum Shary {
    Lina,
    Lihum,
  }
  
  enum Score {
    Win,
    Lose,
  }
  
  class InputPage extends StatefulWidget {
    @override
    _InputPageState createState() =&gt; _InputPageState();
  }
  
  class _InputPageState extends State&lt;InputPage&gt; {
    Talba selectedTalba;
    Shary selectedShary;
    Score selectedScore;
  
    int Bab5 = 5;
    int Sita6= 6;
    int Saba7 = 7;
    int Thimanya8 = 8;
    int Bawan9 = 9;
  
    String output = '0';
  
    var Lina;
    var Lihum;
  
    var Win;
    var Lose;
  
    @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return Scaffold(
        appBar: AppBar(
          title: Text('AlNashra'),
        ),
        body: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: &lt;Widget&gt;[
            Expanded(
              child: Row(
                children: &lt;Widget&gt;[
                  Expanded(
                    child: ReusableCard(
                      onPress: () {
                        setState(() {
                          print(Lihum);
                          selectedShary = Shary.Lihum;
                        });
                      },
                      color: selectedShary == Shary.Lihum
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(
                        label: 'lihum',
                      ),
                    ),
                  ),
                  Expanded(
                    child: ReusableCard(
                      onPress: () {
                        setState(() {
                          print(Lina);
                          selectedShary = Shary.Lina;
                        });
                      },
                      color: selectedShary == Shary.Lina
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(label: 'lina'),
                    ),
                  ),
                ],
              ),
            ),
            Expanded(
              child: Column(
              crossAxisAlignment: CrossAxisAlignment.stretch,
              children: &lt;Widget&gt;[
                Expanded(
                  child: Row(
                    children: &lt;Widget&gt;[
                      Expanded(
                        child: ReusableCard(
                          color: kInactiveCardColor,
                          cardChild: CardChild(
                            label: output,
                          ),
                        ),
                      ),
                      Expanded(
                        child: ReusableCard(
                          color: kInactiveCardColor,
                          cardChild: CardChild(label: output),
                        ),
                      ),
                    ],
                  ),
                ),
                Expanded(
              child: Row(
                children: &lt;Widget&gt;[
                  Expanded(
                    child: ReusableCard(
                      onPress: () {
                        Bawan9 = Bawan9;
                        setState(() {
                          print(Bawan9);
                          selectedTalba = Talba.Bawan;
                        });
                      },
                      color: selectedTalba == Talba.Bawan
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(
                        label: 'Bawan',
                      ),
                    ),
                  ),
                  Expanded(
                    child: ReusableCard(
                      onPress: () {
                        Thimanya8 = Thimanya8;
                        setState(() {
                          print(Thimanya8);
                          selectedTalba = Talba.Thimanya;
                        });
                      },
                      color: selectedTalba == Talba.Thimanya
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(label: 'Thimanya'),
                    ),
                  ),
                   Expanded(
                    child: ReusableCard(
                      onPress: () {
                        Saba7 = Saba7;
                        setState(() {
                          print(Saba7);
                          selectedTalba = Talba.Saba;
                        });
                      },
                      color: selectedTalba == Talba.Saba
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(label: 'Saba'),
                    ),
                  ),
                   Expanded(
                    child: ReusableCard(
                      onPress: () {
                        Sita6 = Sita6;
                        setState(() {
                          print(Sita6);
                          selectedTalba = Talba.Sita;
                        });
                      },
                      color: selectedTalba == Talba.Sita
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(label: 'Sita'),
                    ),
                  ),
                   Expanded(
                    child: ReusableCard(
                      onPress: () {
                        Bab5 = Bab5;
                        setState(() {
                          print(Bab5);
                          selectedTalba = Talba.Bab;
                        });
                      },
                      color: selectedTalba == Talba.Bab
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(label: 'Bab'),
                    ),
                  ),
                ],
              ),
            ),
            Expanded(
              child: Row(
                children: &lt;Widget&gt;[
                  Expanded(
                    child: ReusableCard(
                      onPress: () {
                        setState(() {
                          print(Lose);
                          selectedScore = Score.Lose;
                        });
                      },
                      color: selectedScore == Score.Lose
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(
                        label: 'lose',
                      ),
                    ),
                  ),
                  Expanded(
                    child: ReusableCard(
                      onPress: () {
                        setState(() {
                          print(Win);
                          selectedScore = Score.Win;
                        });
                      },
                      color: selectedScore == Score.Win
                          ? kActiveCardColor
                          : kInactiveCardColor,
                      cardChild: CardChild(label: 'win!'),
                    ),
                  ),
                ],
              ),
            ),
              ],
  
            )),
          ],
        ),
      );
    }
  }
  
  </code></pre>