Border radius of selection list of DropdownButtonFormField in flutter
178
Since flutter 2.11.0-pre the native DropdownButtonFormField
comes with borderRadius
by default.
DropdownButtonFormField(
borderRadius: BorderRadius.circular(20.0),
items: // <your items list>
value: // your value
onChanged: (value) {}
)
You could consider updating your flutter version to 2.11.0+, just keep in mind it's still in beta.
Author by
Tedjoucif
Updated on November 26, 2022Comments
-
Tedjoucif over 1 year
I didn't find how to decorate the list that appears when you click on DropdownButton like make radius for the corners as you see in the screenshot below.
-
Ravindra S. Patil about 2 yearsYou want to dropdown is like rounded corner?
-
Tedjoucif about 2 yearsyeah the list that appears when clicking DropDownButton have a rounded corners
-
-
Tedjoucif about 2 yearsi'm using DropdownButtonFormField that doesn't contain borderRadius,
-
Tedjoucif about 2 yearsi nned to use DropdownButtonFormField because i'm using form
-
Ravindra S. Patil about 2 yearsOk Wait I will try
-
Tedjoucif about 2 yearslook i is an issue in git github.com/flutter/flutter/pull/95944
-
Sambhav Khandelwal about 2 yearsIt would be better if u could format the code