Skip to content

DropdownMenu must use SafeArea #130491

@nikitadol

Description

@nikitadol

Is there an existing issue for this?

Steps to reproduce

Use a widget based on MenuAnchor like DropdownMenu

Expected results

When the list is expanded, it respects padding

Actual results

Part of the list is not visible

Code sample

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

void main() {
  runApp(
    MaterialApp(
      theme: ThemeData.dark(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(),
        bottomNavigationBar: const BottomAppBar(),
        body: Center(
          child: DropdownMenu(
            dropdownMenuEntries: [
              for (final item in Iterable.generate(100))
                DropdownMenuEntry(
                  value: item,
                  label: 'Item $item',
                ),
            ],
          ),
        ),
      ),
    ),
  );
}

Screenshots or Video

Screenshots / Video demonstration

Simulator Screenshot - iPhone 14 Pro Max - 2023-07-13 at 15 00 01

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale en-DE)
    • Flutter version 3.10.5 on channel stable at /Users/nikitadol/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (4 weeks ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nikitadol/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /opt/homebrew/opt/openjdk@11/bin/java
    • Java version OpenJDK Runtime Environment Homebrew (build 11.0.19+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/nikitadol/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9161.14

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop)             • macos                     • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 114.0.5735.198

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.10Found to occur in 3.10found in release: 3.13Found to occur in 3.13frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions