title: How to have togglebutton take the whole space in a container?
body: <p>I'm trying to achieve a flexible behaviour from the togglebutton, my togglebutton is inside a container with a height of 60px and infinte width, how can get the toggle button to take up all the available space?</p>
  
  <p>Sadly I can't use MediaQuery as using it breaks my dropdown functionality somehow, is there any other way?</p>
  
  <p>here is my code for toggle button:</p>
  
  <pre><code>Container(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.all(
                    Radius.circular(10),
                  ),
                  color: Color.fromRGBO(108, 101, 172, 1),
                ),
                width: double.infinity,
                height: 60,
                child: Padding(
                  padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
                  child: ToggleButtons(
                    borderRadius: BorderRadius.all(
                      Radius.circular(10),
                    ),
                   textStyle: TextStyle(
                      fontWeight: FontWeight.w700,
                      fontFamily: 'OpenSans',
                      color: Colors.black,
                      fontSize: 17,
                    ),
                    selectedColor: Colors.black,
                    fillColor: Colors.white,
                    children: &lt;Widget&gt;[
                      Text('My country'),
                      Text('Global'),
                    ],
                    onPressed: (int index) {
                      setState(() {
                        for (int buttonIndex = 0;
                            buttonIndex &lt; isSelected.length;
                            buttonIndex++) {
                          if (buttonIndex == index) {
                            isSelected[buttonIndex] = true;
                          } else {
                            isSelected[buttonIndex] = false;
                          }
                        }
  
                        if (index == 1) {
                          getGlobalResult();
                          isGlobal = true;
                          isTotal = true;
                        } else {
                          getCountryTotalResult(selectedValue);
                          isGlobal = false;
                          isTotal = true;
                          isDaySelected = [true, false, false];
                        }
                      });
                    },
                    isSelected: isSelected,
                  ),
                ),
              ),
  </code></pre>
  
  <p>this is what I get,</p>
  
  <p><a href="https://i.stack.imgur.com/GVviD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GVviD.png" alt="togglebutton"></a></p>
  
  <p>what i want to achieve(did this with constraints)
  <a href="https://i.stack.imgur.com/X8lFb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X8lFb.png" alt="togglebutton"></a></p>