title: Flutter - How to align selected item from DropdownButton?
body: <p>I am unable to align the selected item from DropdownButton to the center.</p>
  
  <p>I have tried child: Center() under the DropdownMenuItem, it is able to align those items however after I have selected one of the items, the selected item was aligned to the Left immediately. I would also like to align <strong>the selected item</strong> to the Center. </p>
  
  <p>Anyone knows how to achieve it?</p>
  
  <p>Thanks in advance.</p>
  
  <p><a href="https://i.stack.imgur.com/lgyDu.png" rel="noreferrer">Unable to align selected item to Center</a></p>
  
  <p>_dropdownValues:</p>
  
  <pre><code>final List&lt;String&gt; _dropdownValues = [
    "One",
    "Two12345",
    "Three123456789",
    "Four",
    ];
  
    String _selectedValue;
  </code></pre>
  
  <p>Under Widget Build:</p>
  
  <pre><code>body: Center(
  
          child: Row(
  
            mainAxisAlignment: MainAxisAlignment.center,
  
            children: &lt;Widget&gt;[
              Container( 
                child: Text('Name:',),
              ),
  
              Container(
  
                child: Center(
                  child: DropdownButton(
                    hint: Text('Select ...'),
                    items: _dropdownValues.map((value) =&gt; DropdownMenuItem(
                      child: Center( child: Text(value), ),
                      value: value,
                    )).toList(),
  
                    onChanged: (String value) {
                      setState(() {
                        this._selectedValue = value;
                      });
                    },
                    isExpanded: false,
                    value: _selectedValue,
                  ),
                ),
              ),
            ],
          ),
        ),
  </code></pre>