Open rirjkl19 opened 7 months ago
As you are using DropdownButtonFormField2
you can simply hide the underline by adding InputDecoration
,.
DropdownButtonFormField2<String>(
decoration: InputDecoration(
border: OutlineInputBorder(
borderSide: BorderSide.none,
),
),
)
just add above code in your DropdownButtonFormField2
Consider the code below:
Was expecting that the Underline inside the
DropdownButtonFormField2
would be hidden just like in theDropdownButtonField2
.I also noticed that DropdownButton2 has an option to have
underline
widget which I could just putSizedBox()
inside which solves the problem without having a parent ofDropdownButtonHideUnderline
eliminating unnecessary widget nesting.Can someone help me on this?