close method
Close the menu that this menu controller is associated with.
Associating with a menu is done by passing a MenuController to a MenuAnchor. A MenuController is also be received by the MenuAnchor.builder when invoked.
If the menu's anchor point (either a MenuBar or a MenuAnchor) is scrolled by an ancestor, or the view changes size, then any open menu will automatically close.
Implementation
void close() {
_anchor?._close();
}