getJavaScriptBridgeName method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WebPlatform(), WindowsPlatform(), LinuxPlatform()])
Future<String> getJavaScriptBridgeName()

Gets the name of the JavaScript Bridge object that is used to interact with the WebView. Use setJavaScriptBridgeName to set a custom name. The default name used by this plugin is flutter_inappwebview_forge.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Web <iframe> but requires same origin
  • Windows WebView2
  • Linux WPE WebKit

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    MacOSPlatform(),
    WebPlatform(),
    WindowsPlatform(),
    LinuxPlatform(),
  ],
)
Future<String> getJavaScriptBridgeName() {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.getJavaScriptBridgeName.name} is not implemented on the current platform',
  );
}