Skip to content

Commit 75cd312

Browse files
authored
Merge pull request #282 from AhmedLSayed9/fix_dropdown_position_when_window_changes_horizontally
Fix dropdown position when window changes horizontally
2 parents dd278eb + e2c7221 commit 75cd312

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/dropdown_button2/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## UNRELEASED
2+
3+
- Fix dropdown menu position when window changes horizontally, closes #243.
4+
15
## 3.0.0-beta.15
26

37
- Always call `onChanged` when tapping enabled item, closes #275.

packages/dropdown_button2/lib/src/dropdown_button2.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,12 +535,7 @@ class _DropdownButton2State<T> extends State<DropdownButton2<T>>
535535
if (_rect.value == null) {
536536
return;
537537
}
538-
final Rect newRect = _getRect();
539-
//This avoid unnecessary rebuilds if _rect position hasn't changed
540-
if (_rect.value!.top == newRect.top) {
541-
return;
542-
}
543-
_rect.value = newRect;
538+
_rect.value = _getRect();
544539
}
545540

546541
TextStyle? get _textStyle =>

0 commit comments

Comments
 (0)