Skip to content

Disabled DropdownButton hint is wrapped by DropdownMenuItem<T> by default #42472

@shihaohong

Description

@shihaohong

When creating a DropdownButton, one can specify a disabled hint widget when none of the available options are selected. However, when DropdownButton is disabled and a disabled hint/hint is specified, it is wrapped by a DropdownMenuItem by default, whereas a DropdownButton that is enabled is not wrapped by DropdownMenuItem:

comparison

Sample code available here.

We should make this consistent so that there isn't a mismatch in behavior between enabled and disabled states.

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions