Revert removing DropdownMenuItem hint/disabledHint wrapper (#42456)

This commit is contained in:
Shi-Hao Hong 2019-10-10 13:43:28 -07:00 committed by GitHub
parent 53cc59f82c
commit a95a84ebfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1062,7 +1062,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
if (widget.hint != null || (!_enabled && widget.disabledHint != null)) {
final Widget emplacedHint = _enabled
? widget.hint
: widget.disabledHint ?? widget.hint;
: DropdownMenuItem<Widget>(child: widget.disabledHint ?? widget.hint);
hintIndex = items.length;
items.add(DefaultTextStyle(
style: _textStyle.copyWith(color: Theme.of(context).hintColor),