我需要在Flutter中添加具有完整宽度并调整下拉箭头图标的DropdownButton。但是,我已经尝试了多种方法,但它无法扩展其完整宽度。
这是我的DropdownButton
代码:
new Expanded(
child: new Column(
children: <Widget>[
new DropdownButton(
items: [
new DropdownMenuItem(child: new Text("Abc")),
new DropdownMenuItem(child: new Text("Xyz")),
],
hint: new Text("Select City"),
onChanged: null
)
]
),
flex: 1,
)