Sitemap
Zeeshan Ali

Zeeshan Ali

Flutter app developer having 6 years of experience.

Change Flutter Dropdown Border Radius

2 min readJul 22, 2023

--

Press enter or click to view image in full size

Flutter dropdown border radius implementation. In this post, I will be changing the Flutter dropdown border radius using an easy and proper Flutter example code for better understanding. What Flutter dropdown border radius is and its usage is also included in this article. So let’s start understanding how to change Flutter dropdown border radius in Flutter dropdown.

What is Flutter Dropdown Border Radius?

Flutter dropdown border radius is as the name suggests, it is the radius of border of Flutter dropdown that you see when you tap on the Flutter dropdown button. In this post, we will understand how we can change the radius of the dropdown, we will make it a bit circular for demonstration. Let’s now implement it using proper Flutter code.

Get Zeeshan Ali’s stories in your inbox

Join Medium for free to get updates from this writer.

Default Flutter Dropdown Shape

Let’s see the default Flutter dropdown shape. For that we have implemented a simple Flutter dropdown button and for the dropdown we have used two Flutter dropdown menu items. See the below code:

DropdownButton(
isExpanded: true,
hint: Text('Select any category', style: TextStyle(fontSize: 15)),
value: categoryValue,
items: [
DropdownMenuItem(
value: 'Sports',
child: Text('Sports',
style: TextStyle(fontSize: 15, color: Colors.black45))),
DropdownMenuItem(
value: 'Tech',
child: Text('Tech',
style: TextStyle(fontSize: 15, color: Colors.black45))),
],
onChanged: (val) {
setState(() {
categoryValue = val.toString();
});
})

In the above image, you can see the shape of the Flutter dropdown. Let’s now change the radius of the Flutter dropdown.

Change Flutter Dropdown Border Radius

To change the border radius of Flutter dropdown, we have to use the border radius constructor of the Flutter dropdown button widget. Then pass it the border radius, in our case we are using border radius circular which will make all sides circular with the same value. See the below code: Continue reading…

--

--

Zeeshan Ali
Zeeshan Ali

Written by Zeeshan Ali

Flutter app developer having 6 years of experience.