open method

void open({
  1. Offset? position,
})

Opens the menu that this MenuController is associated with.

If position is given, then the menu will open at the position given, in the coordinate space of the RawMenuAnchor that this controller is attached to.

If given, the position will override the MenuAnchor.alignmentOffset given to the MenuAnchor.

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 open({Offset? position}) {
  assert(_anchor != null);
  _anchor!.handleOpenRequest(position: position);
}