arya yudha mahendra
arya yudha mahendra

Reputation: 1

Flutter dropdown height can't less than 50dp

enter image description here

I'm so confuse why flutter dropdown can't set height less than 50dp. When i set to 45 like other form, the value of dropdown is cut like in the picture.

Upvotes: 0

Views: 157

Answers (1)

Jenis Radadiya
Jenis Radadiya

Reputation: 420

change content padding,

OR

try this...

Container(
  height: 50.0,
  width: 200.0,
  child: DropdownButton(
           value: dropdownValue,
           icon: Icon(Icons.arrow_downward),
           iconSize: 24,
           elevation: 16,
           isExpanded: true,
           style: TextStyle(color: Colors.deepPurple, fontSize: 20.0),
           underline: Container(
             height: 2,
             color: Colors.deepPurpleAccent,
           ),
           onChanged: (String newValue) {
             setState(() {
               dropdownValue = newValue;
             });
           },
           items: <String>['One', 'Two', 'Free', 'Four']
               .map<DropdownMenuItem<String>>((String value) {
             return DropdownMenuItem<String>(
               value: value,
               child: Text(value),
             );
           }).toList(),
         )
)

Upvotes: 0

Related Questions