0

I want to increase the height and width of my dropdown button. I tried to look for a property but didn't find one, so i set the alignment of its parent Column to CrossAxisAlignment.stretch. It increased the width of the dropdown bar but the down-arrow widget is in the center and the text in the left so it looks off. How can I fix this?

Container taskView = Container(
          padding: EdgeInsets.only(top: 30.0, left: 35.0, right: 35.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,

            children: <Widget>[
          DropdownButton<String>(
              value: _currentlySelected,
              onChanged: (String newValue) {
                setState(() {
                  _currentlySelected = newValue;
                });
              },
              items: tasks.map<DropdownMenuItem<String>>((String value) {
                return DropdownMenuItem<String>(
                  value: value,
                  child:  Text(value),

                );
              })
                  .toList(),
            ),

        ],
      ));

```[![Drop down button][1]][1]


  [1]: https://i.stack.imgur.com/FlVfy.png
Denise
  • 898
  • 1
  • 16
  • 30
  • Possible duplicate to https://stackoverflow.com/questions/48895195/how-can-we-change-the-width-padding-of-a-flutter-dropdownmenuitem-in-a-dropdown – Garry Jun 05 '19 at 18:58
  • No its not. That question is asking for the width adjustment for the dropdown that pops on clicking the DropDown Button, however I am asking regarding the Button itself. – Denise Jun 06 '19 at 03:25
  • Did you try by adding the same in button theme and setting `alignedDropdown: true` option as mentioned in above link? – Garry Jun 06 '19 at 04:23

0 Answers0