showContextMenu function

void showContextMenu(
  1. Offset offset,
  2. BuildContext context,
  3. List<Widget> children,
  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,
  List<Widget> children,
  verticalPadding,
  width,
) {
  showModal(
    context: context,
    configuration: FadeScaleTransitionConfiguration(
      barrierColor: Colors.transparent,
    ),
    builder: (context) => ContextMenu(
      position: offset,
      children: children,
      verticalPadding: verticalPadding,
      width: width,
    ),
  );
}