'Remove default padding of DropDownButton in flutter?

I want to achieve a result like this where my dropdown button has very less padding.

enter image description here

This is what I currently have

enter image description here

so far I have tried adjusting height of dropDownButton, wrapping with a container, assigning padding but nothing works

here's my code

Container(
      child: Center(
        child: DropdownButtonHideUnderline(
          child: ButtonTheme(
            alignedDropdown: true,
            child: DropdownButton<String>(
              dropdownColor: AppColors().white,
              value: value,
              style: TextStyles().medium12,
              icon: Icon(
                Icons.keyboard_arrow_down,
                color: AppColors().green,
              ),
              onChanged: (newValue) {
                setState(() {
                  value = newValue!;
                });
              },
              items: <String>[
                AppStrings().getString().english_language,
                AppStrings().getString().arabic_language,
                AppStrings().getString().urdu_language,
              ].map<DropdownMenuItem<String>>((String value) {
                return DropdownMenuItem<String>(
                  value: value,
                  child: Text(
                    value,
                  ),
                );
              }).toList(),
            ),
          ),
        ),
      ),
      padding: EdgeInsets.only(
        left: 10.w,
        right: 10.w,
      ),
      decoration: BoxDecoration(
        border: Border.all(color: AppColors().green, width: 6.w),
        borderRadius: BorderRadius.all(
            Radius.circular(25.r) //         <--- border radius here
        ),
      ),
    );

can someone please help me? thankyou so much



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source