我想增加下拉按钮的高度和宽度。我试图寻找一个属性,但没有找到一个属性,因此我将其父列的对齐方式设置为CrossAxisAlignment.stretch。它增加了下拉栏的宽度,但是向下箭头的小部件在中间,而文本在左侧,因此看上去很象。我怎样才能解决这个问题?
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