I want to change the background color and border radius of DropDownButton
,
i have tried it with theme
but it changes the color of dropdown not the button
Theme(
data: Theme.of(context)
.copyWith(canvasColor: Colors.blue),
child: DropdownButton(
items: [DropdownMenuItem(child: Text('one'))],
onChanged: (newvlaue) {}),
)
2
Answers
You can use the properties
dropdownColor
andborderRadius
to change the background color and border radius of dropdown button items:if you want to change the color of the button and add a radius you can wrap the dropdown button with a container.