onTitleChanged method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebChromeClient.onReceivedTitle', apiUrl: 'https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)'), IOSPlatform(), MacOSPlatform(), WindowsPlatform(apiName: 'ICoreWebView2.add_DocumentTitleChanged', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_documenttitlechanged')])
void onTitleChanged(
  1. String? title
)

Event fired when a change in the document title occurred.

title represents the string containing the new title of the document.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • title: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebChromeClient.onReceivedTitle',
      apiUrl:
          'https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)',
    ),
    IOSPlatform(),
    MacOSPlatform(),
    WindowsPlatform(
      apiName: 'ICoreWebView2.add_DocumentTitleChanged',
      apiUrl:
          'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_documenttitlechanged',
    ),
  ],
)
void onTitleChanged(String? title) {}