File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/dropdown_button2/lib/src Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,17 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>> with WidgetsBin
563563 itemBox.localToGlobal (Offset .zero, ancestor: navigator.context.findRenderObject ()) &
564564 itemBox.size;
565565
566- return contentPadding.inflateRect (itemRect);
566+ final denseRect = contentPadding.inflateRect (itemRect);
567+
568+ if (widget._inputDecoration? .isDense == false ) {
569+ final extraHeight = kMinInteractiveDimension - denseRect.height;
570+ if (extraHeight > 0 ) {
571+ return (contentPadding + EdgeInsets .symmetric (vertical: extraHeight / 2 ))
572+ .inflateRect (itemRect);
573+ }
574+ }
575+
576+ return denseRect;
567577 }
568578
569579 EdgeInsets ? _getInputDecorationPadding () {
You can’t perform that action at this time.
0 commit comments