The default DropdownButton with DropdownMenuItems returns a light-grey dropdown. How should I customize the dropdown (e.g. background color, dropdown width)? I can change the style
property in both DropdownButton and DropdownMenuItem, like this:
return new DropdownButton(
value: ...,
items: ...,
onChanged: ...,
style: new TextStyle(
color: Colors.white,
),
);
but this doesn't change the dropdown's background color.
Should I copy DropdownMenu and extend it? Does Flutter plan to add customization for this widget in the near future?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…