showContextMenu function

void showContextMenu(
  1. Offset offset,
  2. BuildContext context,
  3. ContextMenuBuilder builder,
  4. dynamic verticalPadding,
  5. dynamic width,
)

Show a ContextMenu on the given BuildContext. For other parameters, see ContextMenu.

Implementation

void showContextMenu(
  Offset offset,
  BuildContext context,
  ContextMenuBuilder builder,
  verticalPadding,
  width,
) {
  showModal(
    context: context,
    configuration: FadeScaleTransitionConfiguration(
      barrierColor: Colors.transparent,
    ),
    builder: (context) => ContextMenu(
      position: offset,
      builder: builder,
      verticalPadding: verticalPadding,
      width: width,
    ),
  );
}