Is it possible to decrease height distance between DropdownMenuItem's in DropdownButton without rewriting Flutter sources?

478 views
Skip to first unread message

Georgii Dernovyi

unread,
Sep 29, 2019, 6:00:35 AM9/29/19
to Flutter Development (flutter-dev)

drop.png


Hi! I want to make the height distance between DropdownMenuItem's 10 times less than by default but can't. Is it possible without rewriting Flutter sources? If not, anyway it is unclear where in dropdown.dart (a file in Flutter sources) the height is set.


DropdownButton<String>(
value: widget.config['value'],
onChanged: (newValue) {
setState(() {
widget.config['value'] = newValue;
});
},
items:
widget.config['options'].map<DropdownMenuItem<String>>((value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
)


Reply all
Reply to author
Forward
0 new messages