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.
Use case
SystemContextMenuController.showwill hide and show the context menu iftargetRectdiffers 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
isVisibleis marked@visibleForTesting.Proposal
Make
isVisiblea public getter, so it's safe to consume and would constitute a breakage if removed at a later point.