hasMenuItem method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(available: '14.0'), MacOSPlatform(available: '10.15')])
bool hasMenuItem(
  1. InAppBrowserMenuItem menuItem
)

Returns true if the menuItem has been already added, otherwise false.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView 14.0+
  • macOS WKWebView 10.15+

Parameters - Officially Supported Platforms/Implementations:

  • menuItem: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(available: '14.0'),
    MacOSPlatform(available: '10.15'),
  ],
)
bool hasMenuItem(InAppBrowserMenuItem menuItem) {
  throw UnimplementedError(
    'hasMenuItem is not implemented on the current platform',
  );
}