Closed lew-kas closed 2 months ago
Thanks for the report. I do see the same behavior using latest versions, wherein, tapping for the first time in the dropdown menu shows as below:
Whereas, all other subsequent taps in the dropdownmenu shows the menu entries properly:
If we set requestFocusOnTap
to false, then the keyboard doesn't appear and we see below:
Maybe related : https://github.com/flutter/flutter/issues/147538
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
DropdownMenu
to enter a search term.Expected results
The
DropdownEntries
should move upwards and be displayed right under theDropdownMenu
when the keyboard appears.Actual results
The
DropdownEntries
remain further down on the screen and do not follow theDropdownMenu
as it moves upwards, causing a misalignment.Code sample
Code sample
```dart import 'package:flutter/material.dart'; /// Flutter code sample for the [DropdownMenuEntry] `labelWidget` property. enum ColorItem { blue('Blue', Colors.blue), pink('Pink', Colors.pink), green('Green', Colors.green), yellow('Yellow', Colors.yellow), grey('Grey', Colors.grey); const ColorItem(this.label, this.color); final String label; final Color color; } class DropdownMenuEntryLabelWidgetExample extends StatefulWidget { const DropdownMenuEntryLabelWidgetExample({super.key}); @override StateScreenshots or Video
Screenshots / Video demonstration
[dropdownmenu.webm](https://github.com/flutter/flutter/assets/49316150/0e973408-407f-463a-b248-7cdd63faa76b)Logs
Logs
```console ```Flutter Doctor output
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22631.3593], locale
de-DE) • Flutter version 3.22.1 on channel stable at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision a14f74ff3a (2 days ago), 2024-05-22 11:08:21 -0500 • Engine revision 55eae6864b • Dart version 3.4.1 • DevTools version 2.34.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at C:\Users\demo\AppData\Local\Android\Sdk • Platform android-34, build-tools 33.0.0-rc4 • ANDROID_SDK_ROOT = C:\Users\demo\AppData\Local\Android\Sdk • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874) • All Android licenses accepted.
[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.2.3) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.2.32526.322 • Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2023.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.2 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart
[√] IntelliJ IDEA Ultimate Edition (version 2023.2) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2023.2 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.89.1) • VS Code at C:\Users\demo\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.88.0
[√] Connected device (4 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31)
(emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3593] • Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.210 • Edge (web) • edge • web-javascript • Microsoft Edge 125.0.2535.51
[√] Network resources • All expected network resources are available.
• No issues found!