【发布时间】:2019-12-12 17:37:21
【问题描述】:
我是 Flutter 开发的新手。我正在使用我的应用程序的下拉按钮。打开下拉菜单时,弹出对话框中的文本被剪切。下面我附上了带有编码的屏幕截图。请指导我解决此问题。
DropdownButtonHideUnderline(
child: new DropdownButton(
isExpanded: true,
value: dropDownValue,
isDense: true,
//icon: Icon(Icons.keyboard_arrow_down, color: Colors.white,),
onChanged: (String newValue) {
setState(() {
dropDownValue = newValue;
state.didChange(newValue);
});
},
items: dropDownList.map((String value) {
return new DropdownMenuItem(
value: value,
child: new SizedBox(
width: MediaQuery.of(context).size.width / 1.4,
child: new Text(value,
softWrap: true,
style: TextStyle(color: Colors.white, fontSize: 18.0),),)
);
}).toList(),
),
),);
【问题讨论】: