Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions packages/dropdown_button2/lib/src/dropdown_button2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,6 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>> with WidgetsBin
},
);

result = KeyedSubtree(key: _buttonRectKey, child: result);

// When an InputDecoration is provided, use it instead of using an InkWell
// that overflows in some cases (such as showing an errorText) and requires
// additional logic to manage clipping properly.
Expand Down Expand Up @@ -992,12 +990,15 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>> with WidgetsBin
onTap: _enabled && !widget.openWithLongPress ? _handleTap : null,
onLongPress: _enabled && widget.openWithLongPress ? _handleTap : null,
behavior: HitTestBehavior.opaque,
child: InputDecorator(
decoration: effectiveDecoration,
isEmpty: widget._isEmpty,
isFocused: _isFocused,
isHovering: _isHovering,
child: result,
child: KeyedSubtree(
key: _buttonRectKey,
child: InputDecorator(
decoration: effectiveDecoration,
isEmpty: widget._isEmpty,
isFocused: _isFocused,
isHovering: _isHovering,
child: result,
),
),
),
),
Expand All @@ -1013,7 +1014,7 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>> with WidgetsBin
overlayColor: _buttonStyle?.overlayColor,
enableFeedback: false,
borderRadius: _getButtonBorderRadius(context),
child: result,
child: KeyedSubtree(key: _buttonRectKey, child: result),
);
}

Expand Down