Skip to content

DropdownMenu has extra padding (margin) #138683

@mhbdev

Description

@mhbdev

Is there an existing issue for this?

Steps to reproduce

Use both TextFormField and DropdownMenu in a colume with a specific width.

Expected results

DropdownMenu should not be padded from the start for no reason.

Actual results

You will see in the picture, that the DropdownMenu is not aligned in the right way and it is a bit a head of TextFormField.

Solution

Changing const double _kDefaultHorizontalPadding = 12.0; value to 16.0 will do the trick and fixes the issue. if it is ok I can make a pull request for that.

Code sample

Code sample
Column(
    children: [
        TextFormField(),
        DropdownMenu()
    ]
)

Screenshots or Video

Screenshots / Video demonstration

image

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.13.9, on Microsoft Windows [Version 10.0.22621.2715], locale en-US)
    • Flutter version 3.13.9 on channel stable at C:\FlutterStable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d211f42860 (4 weeks ago), 2023-10-25 13:42:25 -0700
    • Engine revision 0545f8705d
    • Dart version 3.1.5
    • DevTools version 2.25.0

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\AndroidSdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_SDK_ROOT = C:\AndroidSdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • 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.7.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.7.34031.279
    • Windows 10 SDK version 10.0.20348.0

[√] Android Studio (version 2022.3)
    • 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
    • android-studio-dir = C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.84.2)
    • VS Code at C:\Users\MonoBit\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.76.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.2715]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.160
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 119.0.2151.72

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

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions