setContextMenu method

Future<void> setContextMenu(
  1. ContextMenu? contextMenu
)

Sets or updates the WebView context menu to be used next time it will appear.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView

Parameters - Officially Supported Platforms/Implementations:

  • contextMenu: all platforms

Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.

Implementation

Future<void> setContextMenu(ContextMenu? contextMenu) =>
    platform.setContextMenu(contextMenu);