How to open DropdownButton items list below the hint text not over the whole button
If you look at Flutter example with the link below you will see when you click at "One" item it will open all dropdown items over the dropdown.
I need that "One" item should still appear and items opens below "One" like image below?
How to fix it without using another package
Container(
margin: EdgeInsets.only(left: 0, right: 11),
height: 50,
child: DropdownButton<dynamic>(
hint: Padding(
padding: const EdgeInsets.only(left: 8),
child: Text('Choose type', textScaleFactor: 1.2,
style: TextStyle(color: Colors.grey ),),
),
value: type,
icon: Icon(Icons.arrow_drop_down),
iconSize: 40,
iconEnabledColor: Colors.blue,
elevation: 16,
itemHeight: 90,
isExpanded: true,
style: TextStyle(color: Colors.black),
isDense: false,
underline: Divider(height: 0, color: Colors.black, ),
onChanged: (val) {
if(val != null) {
setState(() {
type = val;
});
}
},
items: types_view.types_list.map<DropdownMenuItem>(( value) {
return DropdownMenuItem(
value: value,
child: Padding(
padding: const EdgeInsets.only(left: 8),
child: Text(value.toString(), textScaleFactor: 1.2, style: TextStyle(color: Colors.black),),
),
);
}).toList(),
),
),
Best regards