Skip to content

DropdownMenu inputDecoration isCollapsed property does not reduce vertical spacing #138691

Closed

Description

@albe-jj

Existing workaround: #138691 (comment)


Is there an existing issue for this?

Steps to reproduce

I'm would like to remove the vertical spacing in the DropdownMenu here (blue arrow)

image

however it seems like there is no way to reduce the spacing. The InputDecorator property isCollapsed: true has no effect

Expected results

image

Actual results

image

Code sample

Code sample
 DropdownMenu<String>(
        inputDecorationTheme: const InputDecorationTheme(
          contentPadding: EdgeInsets.fromLTRB(5, 0, 5, 0), 
          isCollapsed: true
          ),
          ...
)

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.19045.3570], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.8.3)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.84.2)
[√] Connected device (3 available)
[√] Network resources

• No issues found!

Activity

  1. dam-ease commented on Nov 20, 2023

    @dam-ease

    Thanks for filing this.
    I can reproduce this as well also with the isDense property, this might be similar/related to #60624.
    Can you check this out?

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 20, 2023
  3. albe-jj commented on Nov 20, 2023

    @albe-jj
    Author

    Thanks for the response. I looked at the issue. It could be related, I'm not sure.
    It seems like in this the icon is taking all the space. Is there any workaround? I've already tried to minimize the contentPadding: EdgeInsets.fromLTRB(5, 0, 5, 0), as suggested in the issue you mentioned, but there is still plenty of vertical space.

    image

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 20, 2023
  5. dam-ease commented on Nov 21, 2023

    @dam-ease

    Thanks for your response.
    I can see this as well and I don't see any workaround that could suit this use case. Replacing the trailingIcon with a SizedBox still gives it the default padding.
    This might be similar/related to #60624
    I'll be labelling this for more insights.

    stable, master flutter doctor -v

    [!] Flutter (Channel stable, 3.16.0, on macOS 14.0 23A344 darwin-arm64, locale
        en-NG)
        • Flutter version 3.16.0 on channel stable at
          /Users/damilolaalimi/sdks/flutter
        ! Warning: `dart` on your path resolves to
          /opt/homebrew/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your
          current Flutter SDK checkout at /Users/damilolaalimi/sdks/flutter.
          Consider adding /Users/damilolaalimi/sdks/flutter/bin to the front of your
          path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision db7ef5bf9f (5 days ago), 2023-11-15 11:25:44 -0800
        • Engine revision 74d16627b9
        • Dart version 3.2.0
        • DevTools version 2.28.2
        • If those were intentional, you can disregard the above warnings; however
          it is recommended to use "git" directly to perform update checks and
          upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/damilolaalimi/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15A507
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • 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.6+0-17.0.6b802.4-9586694)
    
    [!] Android Studio (version unknown)
        • Android Studio at /Users/damilolaalimi/Downloads/Android Studio
          Preview.app/Contents
        • 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
        ✗ Unable to determine Android Studio version.
        • Java version OpenJDK Runtime Environment (build
          17.0.7+0-17.0.7b1000.6-10550314)
    
    [✓] VS Code (version 1.84.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] VS Code (version 1.83.1)
        • VS Code at /Users/damilolaalimi/Downloads/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] Connected device (5 available)
        • sdk gphone64 arm64 (mobile) • emulator-5554                        •
          android-arm64  • Android 14 (API 34) (emulator)
        • Damilola’s iPhone (mobile)  • 00008110-001964480AE1801E            • ios
          • iOS 17.1.1 21B91
        • iPhone 15 (mobile)          • F17D2919-6D61-4295-8408-1719692FE958 • ios
          • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
        • macOS (desktop)             • macos                                •
          darwin-arm64   • macOS 14.0 23A344 darwin-arm64
        • Chrome (web)                • chrome                               •
          web-javascript • Google Chrome 119.0.6045.159
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 2 categories.
    
    [!] Flutter (Channel master, 3.17.0-12.0.pre.39, on macOS 14.0 23A344 darwin-arm64, locale en-NG)
        • Flutter version 3.17.0-12.0.pre.39 on channel master at /Users/damilolaalimi/fvm/versions/master
        ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/damilolaalimi/fvm/versions/master. Consider adding /Users/damilolaalimi/fvm/versions/master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision b6ef78e955 (2 hours ago), 2023-11-20 23:37:25 -0500
        • Engine revision 70b1c73412
        • Dart version 3.3.0 (build 3.3.0-152.0.dev)
        • DevTools version 2.30.0-dev.4
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/damilolaalimi/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15A507
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • 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.6+0-17.0.6b802.4-9586694)
    
    [!] Android Studio (version unknown)
        • Android Studio at /Users/damilolaalimi/Downloads/Android Studio Preview.app/Contents
        • 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
        ✗ Unable to determine Android Studio version.
        • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    
    [✓] VS Code (version 1.84.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] VS Code (version 1.83.1)
        • VS Code at /Users/damilolaalimi/Downloads/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] Connected device (5 available)
        • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
        • Damilola’s iPhone (mobile)  • 00008110-001964480AE1801E            • ios            • iOS 17.1.1 21B91
        • iPhone 15 (mobile)          • F17D2919-6D61-4295-8408-1719692FE958 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
        • macOS (desktop)             • macos                                • darwin-arm64   • macOS 14.0 23A344 darwin-arm64
        • Chrome (web)                • chrome                               • web-javascript • Google Chrome 119.0.6045.159
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 2 categories.
    

  6. added
    p: material_uimaterial_ui package in flutter/packages
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-designOwned by Design Languages team
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: qualityA truly polished experience
    and removed
    in triagePresently being triaged by the triage team
    on Nov 21, 2023
  7. 16 remaining items

  8. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Dec 12, 2024
  9. flutter-triage-bot commented on Dec 12, 2024

    @flutter-triage-bot

    This issue is assigned to @bleroux but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  10. moved this from To do to In progress in Nevercodeon Dec 17, 2024
  11. moved this from In progress to PR submitted in Nevercodeon Jan 10, 2025
  12. moved this from PR submitted to Done (PR merged) in Nevercodeon Jan 15, 2025
  13. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 15, 2025
  14. github-actions commented on Jan 29, 2025

    @github-actions

    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.

  15. locked as resolved and limited conversation to collaborators on Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

⏳Bot is counting down the days until it unassigns the issueP2Important issues not at the top of the work lista: qualityA truly polished experiencefound in release: 3.16Found to occur in 3.16found in release: 3.17Found to occur in 3.17frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

  • Status
    Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions