Flutter DropdownButton same color as parent Widgets. Have you tried wrapping your Dropdown in a Container with a white color, then just ensure the child on the DropdownButton style attribute has a TextStyle with black color.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | new Container( color: Colors.white, child: DropdownButtonHideUnderline( child: ButtonTheme( alignedDropdown: true, child: DropdownButton<T>( items: dropdownItems, onChanged: this.onChanged, value: this.preSelected, style: new TextStyle( color: Colors.black, ), ), ) ), ), |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.