Skip to content

isVisible should be public on SystemContextMenuController #179263

Description

@timcreatedit

Use case

SystemContextMenuController.show will hide and show the context menu if targetRect differs by even a fraction of a pixel.

We are building a text field that can be visually stretched by the user (similar to Liquid Glass), and would like control over this behavior, as not every transformation should lead to the system context menu disappearing and appearing again.

We would like to work around this by calling show() only if the menu is not currently being displayed.
However, we don't have any safe way to do that, as we cannot know from the outside whether the menu is currently being shown, since isVisible is marked @visibleForTesting.

Proposal

Make isVisible a public getter, so it's safe to consume and would constitute a breakage if removed at a later point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions