Bruno Leroux cbfa8f452d
Fix DropdownMenu width when decorationBuilder provides label (#178465)
## Description

This PR fixes `DropdownMenu` preferred width calculation to include the
label provided by `DropdownMenu.decorationBuilder`.

## Before

<img width="225" height="63" alt="Image"
src="https://github.com/user-attachments/assets/47dbec7d-c59c-4379-8f22-792c844f6ac4"
/>

## After

<img width="225" height="63" alt="Image"
src="https://github.com/user-attachments/assets/d4223e56-2b3f-4e12-893a-284ceb3b8ea4"
/>

## Related Issue

Fixes [DropdownMenu wrong width when decorationBuilder provides label
](https://github.com/flutter/flutter/issues/178459)

## Tests

- Adds 2 tests.
2025-11-17 22:16:01 +00:00
..
2025-07-22 17:51:20 +00:00

Flutter

Flutter is a new way to build high-performance, cross-platform mobile, web, and desktop apps. Flutter is optimized for today's — and tomorrow's — mobile and desktop devices. We are focused on low-latency input and high frame rates on all platforms.

See the getting started guide for information about using Flutter.