Is there a way to change the input color of a DropdownSearch widget? The default color is black but I want to change it to grey. I have tried labelStyle: TextStyle(color: Colors.white) but it does not work.
This is my DropdownSearch Widget
Container( child: DropdownSearch<String>( mode: Mode.BOTTOM_SHEET, showSearchBox: true, dropdownSearchDecoration: new InputDecoration( enabledBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.white), ), focusedBorder: UnderlineInputBorder( borderSide: BorderSide(color: Colors.white), ), prefixIcon: const Icon( Icons.corporate_fare, color: Colors.white, ), ), showAsSuffixIcons: true, showClearButton: false, dropdownButtonBuilder: (_) => Padding( padding: const EdgeInsets.all(8.0), child: const Icon( Icons.arrow_drop_down, size: 24, color: Colors.grey, ), ), showSelectedItem: true, items: _industry, onChanged: (String newValue) { setState(() { dropDownValue = newValue; }); }, selectedItem: dropDownValue, ), ),
https://stackoverflow.com/questions/67041350/change-input-text-color-on-dropdownsearch April 11, 2021 at 12:03PM
没有评论:
发表评论