Skip to content

DropdownMenu children is shorter than the TextField when it expands to full-screen width #172680

@QuncCccccc

Description

@QuncCccccc

Steps to reproduce

  1. Set expandedInsets: EdgeInsets.zero, and make the DropdownMenu fully expands to the screen width.
  2. Open menu

Expected results

The item width should be equal to the width of the text field.

Actual results

The item width is shorter.

Code sample

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

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

class DropdownMenuExample extends StatefulWidget {
  const DropdownMenuExample({super.key});

  @override
  State<DropdownMenuExample> createState() => _DropdownMenuExampleState();
}

class _DropdownMenuExampleState extends State<DropdownMenuExample> {
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: DropdownMenu<int>(
            expandedInsets: EdgeInsets.zero,
            dropdownMenuEntries: <DropdownMenuEntry<int>>[
              DropdownMenuEntry<int>(value: 0, label: 'hhh'),
            ],
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration Image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged 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