first Photo second photo I have a costum dropdown menu and each of the rows have a dropdown button. The problem is that the items of my dropdown button are too long to be fit in one row so can i expand the itemHeight so some of my dropdownButton items fit better and my dropdown button width wont cover my whole listTile? i tried with itemHeight property and its not working here is what happens when i use sized box with height and width: third photo
ListTile(
leading: Radio(
value: 1,
groupValue: groupValue1,
onChanged: handleGroupValue1,
),
title: Text('vie marine'),
trailing: DropdownButton(
itemHeight: 100.0,
dropdownColor: Colors.grey.shade300,
value: ddValue2,
icon: Icon(Icons.keyboard_arrow_down),
elevation: 10,
onChanged: (String newValue) {
setState(() {
ddValue2 = newValue;
});
},
items: [
'select',
'requin'
'mammifere',
'reptile&'
'anguille',//this is an alternative which i want to show in 2 lines, but still be one alternative.
'crustace',
'raie',
'limace&'
'gastropode',
'cephalopode&'
'concombre',
'corail/bivalve'
'/oursin/etoile de mer',
'poisson'
'pelagique',
'poisson'
'de recif',
'poisson'
'de fond',
].map<DropdownMenuItem<String>>(
(String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value);
}).toList(),
),
),