How to make rounded border for dropdownbutton in flutter?

With the form field variant, you can use the OutlineInputBorder InputBorder, used normally for input text fields:

DropdownButtonFormField(
  ...
  decoration: const InputDecoration(
    border: OutlineInputBorder(),
  ),
),

The way the form field does this can be replicated and used with the regular DropdownButton:

InputDecorator(
  decoration: const InputDecoration(border: OutlineInputBorder()),
  child: DropdownButtonHideUnderline(
    child: DropdownButton(
      ...
    ),
  ),
),

Border preview

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)