Skip to content

Allow customization of showMenu transition animation curves and duration #135638

@Caffeinix

Description

@Caffeinix

Is there an existing issue for this?

Use case

Currently showMenu (and classes that use it, such as PopupMenuButton) has a hard-coded 300ms animation when the menu opens or closes. This cannot be modified by any means I have discovered.

This is inconsistent with MenuAnchor-based menus, which have no animation at all, and particularly for right-click context menus it feels far too slow.

Proposal

Looking at the code, it would be fairly straightforward to allow the duration to be overridden via an optional parameter to showMenu and then passed through to the _PopupMenuRoute that's created to service the call. Ideally, PopupMenuButton and friends would also accept that optional parameter and pass it through to showMenu.

Metadata

Metadata

Assignees

Labels

Design Systems StudyIssues identified during the custom design system study.P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterf: 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

Status

Done (PR merged)

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions