Skip to content

DropdownMenu wrong width when decorationBuilder provides label #178459

Description

@bleroux

Steps to reproduce

  1. Run the code sample.
  2. Observe the DropdownMenu width

Expected results

The label text is fully visible:

Image

Actual results

The label text is not fully visibly:

Image

Code sample

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

void main() {
  runApp(const ReproApp());
}

class ReproApp extends StatelessWidget {
  const ReproApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(title: 'DropdownMenu.decorationBuilder width', home: HomePage());
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Material(
      child: Center(
        child: DropdownMenu<String>(
          dropdownMenuEntries: const [
            DropdownMenuEntry(value: "value1", label: "Option 1"),
            DropdownMenuEntry(value: "value2", label: "Option 2"),
            DropdownMenuEntry(value: "value3", label: "Option 3"),
          ],
          textInputAction: TextInputAction.next,
          decorationBuilder: (context, controller) {
            return const InputDecoration(labelText: 'DropdownMenu', border: OutlineInputBorder());
          },
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

Flutter Doctor output

Doctor output
Flutter (Channel master, 3.39.0-1.0.pre-93, on Ubuntu 24.04.2 LTS 6.8.0-87-generic, locale fr_FR.UTF-8)

Activity

  1. self-assigned this
    on Nov 13, 2025
  2. added
    in triagePresently being triaged by the triage team
    frameworkflutter/packages/flutter repository. See also f: labels.
    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
    and removed
    in triagePresently being triaged by the triage team
    on Nov 13, 2025
  3. moved this from To do to Done (PR merged) in Nevercodeon Nov 17, 2025
  4. added
    r: fixedIssue is closed as already fixed in a newer version
    on Nov 18, 2025
  5. github-actions commented on Dec 2, 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.

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

Metadata

Metadata

Assignees

Labels

found in release: 3.39Found to occur in 3.39frameworkflutter/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 team

Type

No type

Projects

  • Status
    Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions