close method
Close the menu that this MenuController is associated with.
Associating with a menu is done by passing a MenuController to a MenuAnchor, RawMenuAnchor, or RawMenuAnchorGroup.
If the menu's anchor point is scrolled by an ancestor, or the view changes size, then any open menu will automatically close.
Implementation
void close() {
_anchor?.close();
}