Skip to content

DropdownMenu menu always appears below the TextField #157916

@bleroux

Description

@bleroux

Steps to reproduce

  1. Run the code sample
  2. Tap on the DropdownMenu

Expected results

The menu appear above the text field as there is no space below:

image

Actual results

The menu is not visible because it is positioned below the text field:

image

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp({super.key});

  final List<DropdownMenuEntry<String>> menuEntries =
      ["Red", "Green", "Blue"].map((t) => DropdownMenuEntry<String>(label: t, value: t)).toList();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Align(
          alignment: Alignment.bottomLeft,
          child: DropdownMenu<String>(
            requestFocusOnTap: true,
            dropdownMenuEntries: menuEntries,
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.27.0-1.0.pre.315, on Ubuntu 24.04.1 LTS 6.8.0-47-generic, locale fr_FR.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.95.0)
[✓] Connected device (2 available)
[✓] Network resources```

</details>

Metadata

Metadata

Assignees

Labels

c: regressionIt was better in the past than it is nowf: material designflutter/packages/flutter/material repository.found in release: 3.27Found to occur in 3.27frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions