Unverified Commit 13d76b29 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

[DropdownButton]: Fix `alignment`parameter doesn't work for `hint` when...

[DropdownButton]: Fix `alignment`parameter doesn't work for `hint` when `isExpanded: true` (#102752)
parent 6778084d
...@@ -1386,7 +1386,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi ...@@ -1386,7 +1386,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
if (widget.hint != null || (!_enabled && widget.disabledHint != null)) { if (widget.hint != null || (!_enabled && widget.disabledHint != null)) {
Widget displayedHint = _enabled ? widget.hint! : widget.disabledHint ?? widget.hint!; Widget displayedHint = _enabled ? widget.hint! : widget.disabledHint ?? widget.hint!;
if (widget.selectedItemBuilder == null) if (widget.selectedItemBuilder == null)
displayedHint = _DropdownMenuItemContainer(child: displayedHint); displayedHint = _DropdownMenuItemContainer(alignment: widget.alignment, child: displayedHint);
hintIndex = items.length; hintIndex = items.length;
items.add(DefaultTextStyle( items.add(DefaultTextStyle(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment