I recently upgraded my Flutter SDK from version 3.0.0 to 3.22.2, and I noticed that the background color of my DropdownButtonFormField has changed automatically. I did not make any changes to the code, and it was working perfectly before the upgrade. Below is my code for the
please suggest me best solution for the Dropdown background color
DropdownButtonFormField:
DropdownButtonFormField<String>(
decoration: const InputDecoration(
fillColor: Colors.transparent,
filled: true,
contentPadding: EdgeInsets.only(right: 10, left: 10),
border: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFE6E5E9), width: 1),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFF09304B), width: 1),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFE6E5E9), width: 1),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
),
),
elevation: 1,
validator: (value) {
print("sdfds");
},
isExpanded: true,
hint: const Text(
"Select Payment Purpose*",
style: TextStyle(
color: Color(0xFF0F0F18),
fontWeight: FontWeight.w400,
fontFamily: 'inter',
fontSize: 14,
),
),
iconSize: 30,
iconEnabledColor: Colors.black,
icon: const Icon(
Icons.keyboard_arrow_down_sharp,
size: 20,
),
value: selectedValue,
items: Constants.transactionPurposeList
.map<DropdownMenuItem<String>>((TransactionPurposeList value) {
return DropdownMenuItem<String>(
value: value.name!,
child: Text(value.name!),
);
}).toList(),
onChanged: (value) {
setState(() {
selectedValue = value;
isSelectPurpose = false;
});
},
)
transactionPurposeList access from Rest API