'How to change dropdown default text color, when it is disabled?
When the dropdown is disabled it has this default black text color, which I want to change. There is an option to change the icon color but no option for text color.
Any help would be greatly appreciated.
DropdownButtonFormField(
value: widget.selectedValue,
items: widget.dropdownItems,
dropdownColor: customTheme.colors.black30,
iconEnabledColor: customTheme.colors.textColor,
iconDisabledColor: Color.fromARGB(143, 144, 144, 144),
Solution 1:[1]
You can change using style
style: const TextStyle(
color: Colors.pink,
backgroundColor: Colors.grey,
),
Here you can find more: https://www.flutter-code.com/2021/06/flutter-dropdownbutton-selected-text.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jasmin Sojitra |
