Skip to content

Option to skip DropdownMenu TrailingIcon Focus when navigating via Keyboard #172687

@AlsoShantanuBorkar

Description

@AlsoShantanuBorkar

Use Case

Focusing the TextField instead of TrailingIcon of the DropdownMenu

Proposal

  • Allow skipping the focus of TrailingIcon when navigating via tab

  • Screen.Recording.2025-07-24.at.2.18.58.PM.mov

Current Behaviour

  • Right now when traversing to DropdownMenu via tab key focuses the TrailingIcon first then the TextField

  • In some cases this behaviour might not be needed but there is no way to turn this off at the moment

  • Screen.Recording.2025-07-24.at.2.15.15.PM.mov

Proposal

One of the following solutions might work for this feature

  • Exposing an API to toggle the focus behaviour which will create a FocusNode with skipTraversal Enabled for the TrailingIcon IconButton in DropdownMenu
DropdownMenu(
    dropdownMenuEntries: [
      DropdownMenuEntry(value: '1', label: '1'),
      DropdownMenuEntry(value: '2', label: '2'),
      DropdownMenuEntry(value: '3', label: '3'),
    ],
    label: Text('Skip Trailing Icon Traversal'),
    skipTrailingIconTraversal: true,
)
  • Passing custom FocusNode with preset behaviour which will be passed to the IconButton in DropdownMenu
DropdownMenu(
    dropdownMenuEntries: [
      DropdownMenuEntry(value: '1', label: '1'),
      DropdownMenuEntry(value: '2', label: '2'),
      DropdownMenuEntry(value: '3', label: '3'),
    ],
    label: Text('Skip Trailing Icon Traversal'),
    trailingIconFocusNode: FocusNode(skipTraversal: true),
)

Metadata

Metadata

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: focusFocus traversal, gaining or losing focusf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions